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.