我有一个从QDialog派生的对话框AlarmSetup,其按钮设置如下:
// button box
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel |ButtonBox::Help, Qt::Horizontal, this);
buttonBox->button(QDialogButtonBox::Ok)->setText("übernehmen");
buttonBox->button(QDialogButtonBox::Cancel)->setText("abbrechen");
buttonBox->button(QDialogButtonBox::Help)->setText("Hilfe");
connect(buttonBox, SIGNAL(accepted()), this, SLOT(slotOk()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(slotCancel()));
connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(slotHelp()));
从第二个对话框AlarmWindow中,我有一个插槽AlarmWindow :: slotOpen(),在其中创建AlarmSetup的新实例并评估AlarmSetup :: exec()的返回代码:
void AlarmWindow::slotOpen() // we create a new instance of AlarmSetup
{
if ( DBG_ALARM ) qDebug() <&
最后
以上就是鲜艳雪碧最近收集整理的关于qdialog 返回值_qt - QDialog :: exec()的返回值始终是QDialog :: Rejected - 堆栈内存溢出...的全部内容,更多相关qdialog内容请搜索靠谱客的其他文章。
发表评论 取消回复