开发者

Custom QDialog in Qt

开发者 https://www.devze.com 2023-03-11 06:01 出处:网络
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 lef

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消