kdelibs

How to load default settings with KConfig on kdelib?

橙三吉。 提交于 2020-01-01 19:59:28
问题 I've a question about KConfig usage. I'm able to write and read settings in my .kde4/share/config/_appname_rc configuration file like that KConfig basicconf; KConfigGroup conf = KConfigGroup(basicconf.group("Settings")); conf.writeEntry("filepath",QString("/path/")); basicconf.sync(); But I don't understand how to use a "default" configuration file to read at first time i run my application, or in case if application settings needs reset. I prefer do not use KConfig XT because my project is

How to load default settings with KConfig on kdelib?

荒凉一梦 提交于 2020-01-01 19:59:15
问题 I've a question about KConfig usage. I'm able to write and read settings in my .kde4/share/config/_appname_rc configuration file like that KConfig basicconf; KConfigGroup conf = KConfigGroup(basicconf.group("Settings")); conf.writeEntry("filepath",QString("/path/")); basicconf.sync(); But I don't understand how to use a "default" configuration file to read at first time i run my application, or in case if application settings needs reset. I prefer do not use KConfig XT because my project is

How to load default settings with KConfig on kdelib?

对着背影说爱祢 提交于 2019-12-04 21:08:25
I've a question about KConfig usage. I'm able to write and read settings in my .kde4/share/config/_appname_rc configuration file like that KConfig basicconf; KConfigGroup conf = KConfigGroup(basicconf.group("Settings")); conf.writeEntry("filepath",QString("/path/")); basicconf.sync(); But I don't understand how to use a "default" configuration file to read at first time i run my application, or in case if application settings needs reset. I prefer do not use KConfig XT because my project is tiny and KConfigXT with kcfgc* files seems excessive. Thank you in advance First, this: KConfigGroup