Configuration file
-
wrote on 28 Feb 2019, 16:45 last edited by
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?
-
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?
wrote on 28 Feb 2019, 16:48 last edited by -
wrote on 28 Feb 2019, 17:33 last edited byThis post is deleted!
-
wrote on 28 Feb 2019, 21:04 last edited by
You might also look at JSON. I've found it to be very flexible for storing configuration entries and groups of configuration profiles.
-
wrote on 28 Feb 2019, 22:25 last edited by
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 ;)
4/5