[Solved] Double click does not read ini file
-
But does the executable start with 'double click' properly and it just doesn't read the ini file? In this case I would suggest you to log the ini file's path to a file and check whether the path is correct.
-
If you use relative paths it's always relative to the application's working directory. The working directory is by default the one you start the app from. So if you start it from terminal/command line it will be the directory you're in when you issue the 'execute' command.
If you want to use your application's executable path you can get it with QCoreApplication::applicationDirPath()
"If you want to find the directory containing the application's executable, see QCoreApplication::applicationDirPath()"
http://doc.qt.nokia.com/4.7-snapshot/qdir.htmlBut for this you have to know where your executable really is. For example on Windows it's the .exe you execute with a double-click. On the other hand on Mac the executable is not the .app what users consider as the executable, but the real executable somewhere in the .app
It's a consistent solution but you have to know these differences between the operating systems - if you plan to distribute to multiple operating systems.