From kde-devel Fri Mar 12 12:32:17 2004 From: Waldo Bastian Date: Fri, 12 Mar 2004 12:32:17 +0000 To: kde-devel Subject: Re: KConfigXT values handling Message-Id: <200403121332.17767.bastian () kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=107909437719425 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri March 12 2004 08:12, Stanislav Visnovsky wrote: > Hi! > > How can I get the default value stored in kcfg file? > I need to reimplement KConfigDialog::UpdateWidgetsDefault() to support > custom widgets. If you have KConfigSkeleton *prefs; then prefs->useDefaults(true); will let all calls to prefs report default values... don't forget to restore the original setting when you are done. A typical usage pattern is: MyDialog::updateWidgetsDefault() { bool saveUseDefaults = prefs->useDefaults(true); updateWidgets(); prefs->useDefaults(saveUseDefaults); } Cheers, Waldo - -- bastian@kde.org -=|[ SUSE, The Linux Desktop Experts ]|=- bastian@suse.com "IBM may, in any manner it sees fit and without royalty to SCO, distribute any Licensed IBM Materials contained in the SCO Products" From: Joint Development Agreement between the SCO, Inc. and International Business Machines Corporation http://www.sec.gov/Archives/edgar/data/851560/0000891618-99-000561.txt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAUa3RN4pvrENfboIRAisnAJ0bWuZIh1/Qm01By241RMwYSWO5PACggyVg YgC/t920DZ6j90T1EGm2C54= =Ob3w -----END PGP SIGNATURE----- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<