Results 1 to 2 of 2

Thread: Finding source dir path

  1. #1
    Join Date
    May 2011
    Posts
    120
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Finding source dir path

    Hi all
    I have an application which i have to run on another machine for which i create its .exe file. In this application i am setting name of labels from xml file, so i can change name of labels as required at run time. When i execute .exe file on another machine and open it and try to chane in xml, no change reflact in exe file. I stored xml file in the same directory as .exe file.

    How i have to set file path so that changes reflact.
    I am setting path like "E:\label.xml"
    I try through QDir::currentPath() it is giving me the path of target directory(E:\SmartHome_Xml-build-desktop\debug\). My source dir and target dir are different.

    What i should do to reflact changes in exe file when it is running on another machine.
    Thanks.

  2. #2
    Join Date
    Nov 2011
    Location
    Oulu, Finland
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Finding source dir path

    You want to know the directory where the EXE is? How about QApplication::applicationFilePath() to get the name, and extract the directory with canonicalPath() method?

Similar Threads

  1. path to qt source
    By sajis997 in forum Newbie
    Replies: 4
    Last Post: 6th August 2011, 00:15
  2. Replies: 5
    Last Post: 6th June 2011, 09:56
  3. QGraphicsItem; Finding path
    By roband915 in forum Qt Programming
    Replies: 2
    Last Post: 24th March 2011, 19:13
  4. Replies: 8
    Last Post: 17th October 2009, 08:10
  5. Replies: 11
    Last Post: 24th March 2006, 06:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.