I want to make a qdialog with 'yes' and 'no' option开发者_Go百科 on it, with the 'no' button option set default. so far I have made the 'no' button default but pressing tab or shift+tab or left arrow on keyboard doesn't take me to 'yes' button. I want it just the same as dialog window appeared (of file replacing file with the same name) in windows while saving a file. any help will be much appreciated. thank you...
Like a QMessageBox::question with the default set to "no"?
http://doc.trolltech.com/4.7/qmessagebox.html#question
QMessageBox::question ( this, tr("Question"), tr("Is this what's needed?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::No);
精彩评论