I\'m using QSettings
to store some data as ini file in Windows.
I want to see the ini file, but I don\'t know what is the location of the ini file.
This is
If you create a QSettings
without giving any specific path, the ini
file will be located in the application path.
QSettings Settings("myapp.ini", QSettings::IniFormat);
Settings.setValue("Test", "data");
//...
qDebug() << QApplication::applicationDirPath();
Be careful though : the application path might change : for instance, if you are developping your app with Qt Creator, in debug mode, the application path is in the /debug
subfolder.
If you are running it in release mode, the application path is in the /release
subfolder.
And when your application is deployed, by default, the application path is in the same folder as the executable (at least for Windows).