Results 1 to 2 of 2

Thread: path ressources

  1. #1
    Join Date
    Aug 2009
    Posts
    30
    Thanks
    13
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default path ressources

    I need to load some setup files when I start my application. I would to know which PATH OPTION I should use to be compatible with mac, linux and windows to be sure to find the files.
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: path ressources

    You can use QCoreApplication::applicationDirPath.
    It returns the path that contains the executable.

    If you needs some "absolute" path independent from the executable, you can use QDir methods as homePath(), rootPath() and so on
    A camel can go 14 days without drink,
    I can't!!!

  3. The following user says thank you to mcosta for this useful post:

    shenakan (6th November 2009)

Similar Threads

  1. File path issue...
    By kaushal_gaurav in forum Qt Programming
    Replies: 9
    Last Post: 1st October 2008, 15:36
  2. QFileDialog disable Dir Path
    By user_mail07 in forum Qt Programming
    Replies: 2
    Last Post: 15th April 2008, 19:57
  3. how do I get the default picture path of qtopia 2.2
    By pencilren in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th September 2007, 09:01
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  5. Which path should I use?
    By Dark_Tower in forum Newbie
    Replies: 3
    Last Post: 8th April 2006, 12:09

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.