Default values of KConfigXT items

Waldo Bastian bastian at kde.org
Sun Feb 13 21:20:39 GMT 2005


On Sunday 13 February 2005 14:07, Ingo Klöcker wrote:
> Hi,
>
> I ran into the problem that there's no easy way to get the default value
> of a KConfigXT item. But this is needed in all configuration dialogs
> which have a "Defaults" button.

See how KConfigDialog handles this, I guess you are not using KConfigDialog?

You can call KConfigDialogManager::updateWidgetsDefault or, if you don't use 
KConfigDialogManager either, use something like:

  bool bUseDefaults = m_conf->useDefaults(true);
  ...initialize widgets from the settings in m_conf...
  m_conf->useDefaults(bUseDefaults);

Cheers,
Waldo
-- 
bastian at kde.org   |   Free Novell Linux Desktop 9 Evaluation Download
bastian at suse.com  |   http://www.novell.com/products/desktop/eval.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050213/d64ac898/attachment.sig>


More information about the kde-core-devel mailing list