Results 1 to 1 of 1

Thread: Get the application path

  1. #1
    Join Date
    May 2012
    Posts
    136
    Thanks
    2
    Thanked 27 Times in 24 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Get the application path

    I'm using Qt5.3 on windows and I want to get the application path.
    Normally I always used qApp-> applicationDirPath(), but now I noticed that when I start the application from a shortcut that has it's "start in" directory set to something else than the application path, qApp-> applicationDirPath() returns the "start in" directory and not the real application path

    Is there a way to always get the applications path and not the "start in" path?

    Thx in advance

    Nevermind I didn't add the file path to the affected files (realy need to learn how to read)
    Last edited by StrikeByte; 27th January 2015 at 09:24.

Similar Threads

  1. Application directory path on linux (shortcut)
    By MadBear in forum Qt Programming
    Replies: 2
    Last Post: 11th March 2018, 20:18
  2. Replies: 5
    Last Post: 3rd February 2010, 23:50
  3. Replies: 8
    Last Post: 17th October 2009, 08:10
  4. Qt4: How to get the Common Application Data folder path?
    By Ankitha Varsha in forum Qt Programming
    Replies: 10
    Last Post: 21st October 2008, 12:14
  5. application directory path on mac
    By munna in forum Qt Programming
    Replies: 0
    Last Post: 27th January 2007, 11:45

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.