This commit is contained in:
2024-08-27 16:12:13 +08:00
parent 84da863898
commit 83eb308eaf
6 changed files with 55 additions and 26 deletions
@@ -17,6 +17,7 @@ public:
};
QPushButton* closeBtn = new QPushButton(this);
fancyButtonText* continueBtn = new fancyButtonText(120,60,"继续","继续");
fancyButtonText* cancelBtn = new fancyButtonText(120, 60, "取消", "取消");
fancyWarnWindow(type typeIn,QString title,QString detail,bool Show)
{
QPalette paletteWhite, paletteRed, paletteGreen;
@@ -110,9 +111,11 @@ public:
QHBoxLayout* funcBtnLayout = new QHBoxLayout();
funcBtnLayout->addWidget(continueBtn, 3, 0);
funcBtnLayout->addWidget(cancelBtn, 3, 0);
layout->addLayout(funcBtnLayout, 3, 0);
QObject::connect(continueBtn, &QPushButton::clicked, this, &QDialog::close);
QObject::connect(cancelBtn, &QPushButton::clicked, this, &QDialog::close);
this->setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
if (Show == true)
this->show();