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.
Most global config files are located in the /etc directory. The /etc/ directory feels more like a filesystem and has many sub-directories, each having related config files.
QSettings is an abstraction around these technologies, enabling you to save and restore application settings in a portable manner. It also supports custom storage formats. QSettings's API is based on QVariant, allowing you to save most value-based types, such as QString, QRect, and QImage, with the minimum of effort.
To retrieve a value for a specified key from the <appSettings> section of the configuration file, use the Get method of the AppSettings property of the ConfigurationManager class. The ConfigurationManager class is in the System. Configuration namespace. When the AppSettings.
Is there a recomended way of saving my application's settings (like user selections, window size, postion etc.) in a file (ini or any other format) using Qt?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With