PDA

View Full Version : QDir::currentPath() and start program at login - Windows



been_1990
14th February 2010, 18:23
I have to access several files(images, etc..) that are on sub-folders of my installed program. But when putting the program to launch at startup it seems that QDir::currentPath() isn't where the executable is, but rather somewhere else where the shortcut is.
Should I use the Windows Registry to set my app's path? I yes, how can I access it with QT?

Lykurg
14th February 2010, 19:27
To get the dir of your executable you have to use QCoreApplication::applicationDirPath(). Have also a look at the wiki: Current_working_directory

been_1990
17th February 2010, 01:49
Thank you very much.