QMessageBox

QMessageBox msgBox;
                    msgBox.setText(tr("包含未确认报警!"));
                    msgBox.setInformativeText("是否跳过该项?");
                    QPushButton *skip = msgBox.addButton(tr("跳过"), QMessageBox::ActionRole);
                    QPushButton *skipAll = msgBox.addButton(tr("全部跳过"), QMessageBox::AcceptRole);
                    msgBox.addButton(tr("取消"), QMessageBox::RejectRole);
                    msgBox.setDefaultButton(skip);
                    msgBox.exec();
                    if (msgBox.clickedButton() == skip)
                    {
                        unConfirmSkip = 0;
                        continue;
                    }
                    else if (msgBox.clickedButton() == skipAll)
                    {
                        unConfirmSkip = 1;
                        continue;
                    }
不为其他,只为快乐!
原文地址:https://www.cnblogs.com/1521299249study/p/11841241.html