QDialog dlg(this); //指定父窗口,可以让你的任务栏不显示标记,否则和QWidget效果一样
dlg.setModal(false);
dlg.Show();
if(dlg.exec() == QDialog::Accepted)
{
qDebug() << QString::fromLocal8Bit("确认对话框");
}
else
{
qDebug() << QString::fromLocal8Bit("拒绝对话框");
}
转载自https://blog.csdn.net/qq_38114288/article/details/89371582