PDA

View Full Version : Disable default button in QDialog



ouekah
4th June 2010, 13:59
Is there an elegant way to disable the default button in a QDialog ?

Zlatomir
4th June 2010, 15:33
I don't know how to do this if you use Designer -> Dialog(with buttons), but

you can create your own buttons and use: okButton->setDisabled(true); //in the class constructor
And connect some signal (bool) to setEnable(bool) slot of the button (if user edits something.. or what should trigger the activation of okButton)