PDA

View Full Version : Apply button in Configuration dialog



UVV
24th October 2010, 05:20
Hi,
I need to change a state of Apply button in Configuration dialog.
Could someone suggest a better solution than comparison of previous and current values of input widgets?

BTW, I noticed that KDE-applications use this class http://api.kde.org/3.5-api/kdelibs-apidocs/kdecore/html/classKConfigSkeleton.html . Does Qt have something like that?

wysota
24th October 2010, 10:36
It depends what you want to do when someone changes input of X from 'a' to 'b' and then back to 'a'. In general there is the QLineEdit::modified property that might be helpful for line edits and text edits. You'd need to connect signals such as textEdited() or textChanged() and update the state of the 'apply' button based on the modification state of widgets.