What's the best way to detect a change on dialog to show MODIFIED on the title?
-
When the user edits data on a QDialog with lot's of controls, like QLineEdit, QComboboxes, etc. I want to notice if at least one of them has changed by the user not by the program.
Which events notify of user change the data with a keyboard or mouse? Because I want to show a grayed out save button, but when a user changes something I want to enable the save button.
Right now when loading the data onto the controls it is sending out change notifications. I don't need that. I need the change notification when the user changes the data.
Thanks
-
For QLineEdit, you have the
editingFinished()
andtextEdited()
signals. I don't think there's anything similar for QComboBox.@ki-John said:
Right now when loading the data onto the controls it is sending out change notifications. I don't need that. I need the change notification when the user changes the data.
As a workaround, you can call QObject::blockSignals() first, then load the values, then unblock the signals again.