Hello all, In my application I'm using KConfigXT, everything works fine when I change the settings values from the dialog inherited by KConfigDialog, but if I write the configuration values using the class generated from the kcfg file the changes are not reflected into the settings dialog. Here is the flow:
1) Open the settings dialog (it will be cached by KConfigDialog), change some values and close it 2) Call some code that writes the same values using the class generated by kcfg generator 3) Reopen the dialog cached instance. The values shown by the widgets are the old ones. I read the docs and the tutorial at http://techbase.kde.org/Development/Tutorials/Using_KConfig_XT, but didn't find anything that pointed me to a wrong use of the framework, so maybe it is a bug. To be sure I read the sources of KConfigDialog and maybe spotted the problem: in KConfigDialog::showEvent() there is a check to a boolean flag KConfigDialog::KConfigDialogPrivate::shown that get set to true at the end of the method but never set to false. In the showEvent() method there is the code that updates the widgets according to KConfigSkeleton state. Since "shown" is never set to false that code will not be executed the next time the dialog->show() is called. I didn't find a way to force KConfigDialog to update the widgets; the responsible to update them is KConfigDialogManager and it's enclosed in KConfigDialog::KConfigDialogPrivate. I did an ugly hack to make it work: discarding the cached instance in place of a new one each time the settings dialog is opened. I didn't fill a bug report because i was unsure if it was an expected behavior or not. Am I missing something? Regards, Francesco Di Muccio. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<