×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    installed file relative path in QT

    My sis package contains a file, called setting.ini
    the sis package of the application can be installed to C or E, or other drives.
    How to runtime load/read the setting.ini file in the code?

    Note: I do not want to put it in the resource file.
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: installed file relative path in QT

    Simplest thing to do is to just refer to the file without using any drive or directory. Unless you've previously changed the current directory setting, it will default to the application's home directory.

    I **think** that QDir::homePath will return the path to this location, but I'm not 100% sure on that.

  3. #3
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: installed file relative path in QT

    I decided to use the application private path, and this would be simple. thanks.
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

Similar Threads

  1. Error while Accessing files with relative path
    By jaspindersb in forum Symbian
    Replies: 3
    Last Post: 2009-09-15, 05:33
  2. [moved] Path to installed EXEs?
    By zumbo_oxinia in forum Symbian
    Replies: 3
    Last Post: 2009-09-14, 20:53
  3. Help determine the the installed path
    By stevenc9 in forum Symbian
    Replies: 5
    Last Post: 2009-05-27, 09:30
  4. Can't use relative paths in pkg file
    By ed_welch in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2008-06-25, 12:52
  5. How can I access file through relative path
    By beta55 in forum Symbian
    Replies: 8
    Last Post: 2006-03-07, 02:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×