PDA

View Full Version : default on focus different item in messagebox?



gfunk
26th October 2007, 00:26
I'm using a QMessageBox with a Yes and No, and it puts the default focus on the Yes button. Is there a way to put the default focus on the No button instead?

jpn
26th October 2007, 06:54
It's the defaultButton parameter of static QMessageBox::question() (or QMessageBox::setDefault() in case you're actually instantiating a QMessageBox object).