KConfigXT Signals

Pedro Lopez-Cabanillas pedro.lopez.cabanillas at gmail.com
Sun Jan 10 00:51:51 GMT 2010


On Friday, January 8, 2010, Keith Rusler wrote:
> On Friday 08 January 2010 04:25:31 Andreas Pakulat wrote:
> > On 08.01.10 03:18:33, Keith Rusler wrote:
> > > I recently started needing signals to be emitted from my configuration
> > > dialogue when certain changes were made like tab position of the main
> > > view, etc. I followed the guide and added them to the settings.kcfg
> > > file. The generated code works perfectly.. All my settings are modifed
> > > and save but none of the signals are emitted when the value is changed
> > > on a KComboBox and I hit OK or Apply button. Is there something that I
> > > probably missed out on as the tutorial barely goes in to details about
> > > it.
[...]
> This is the slot that is connected to the serverTabPositionChanged. The
> only time I see the changes is when I restart the application.

I wanted something similar for KMid2, having a KConfigDialog using a KConfigXT 
generated Settings class. I wanted to know when certain properties have been 
modified by the config dialog. The bad news are that the signals are emitted 
only when you call in your code the generated class setters methods, but 
KConfigDialogManager doesn't use the setters to modify the values, so the 
flags are never updated in the generated Settings class, and the signals are 
never emitted. I guess that this should be warned in the tutorial, to avoid 
more people get confused. KConfigDialogManager uses dynamic properties 
instead of the setters, so maybe QDynamicPropertyChangeEvent provides a 
solution, or is there something better?

Regards,
Pedro




More information about the kde-core-devel mailing list