Configuration file
Unsolved
General and Desktop
-
Hi
I need to have some sort of configuration file that can be edited by a user.
The configuration file will contain groupings of items for examplePrintButton: Visible: true, AsPng: true, ForcePdf: false, GrayScale: false
Has anyone got any ideas on how best to achieve this?
-
You might also look at JSON. I've found it to be very flexible for storing configuration entries and groups of configuration profiles.
-
I've used the QSetttings class, too. It's very well done. You can instantiate an object QSettings qs("organization", "application") which basically groups the settings in a config file. On linux the file is stored at ~/.config/organization/appliction.conf. Then there are calls to read/write to the file. Try it, you'll like it ;)