备份
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -14,18 +14,24 @@ public:
|
||||
_fancyWarnWindow = new fancyWarnWindow(fancyWarnWindow::tip, "是否继续背面检测", "", false);
|
||||
_fancyWarnWindow->disableHideAfterClicked();
|
||||
_fancyWarnWindow->hide();
|
||||
_fancyWarnWindow->closeBtn->hide();
|
||||
QObject::connect(_fancyWarnWindow->continueBtn, &QPushButton::clicked, this, &backContinueDetDialog::continueClicked);
|
||||
|
||||
QObject::connect(_fancyWarnWindow->cancelBtn, &QPushButton::clicked, this, &backContinueDetDialog::cancelClicked);
|
||||
}
|
||||
private:
|
||||
|
||||
public slots:
|
||||
void cancelClicked()
|
||||
{
|
||||
qDebug() << "点击了取消检测背面";
|
||||
}
|
||||
void continueClicked()
|
||||
{
|
||||
timer->start(10000);
|
||||
emit continueClickedSignal();
|
||||
_fancyWarnWindow->continueBtn->setDisabled(true);
|
||||
QObject::connect(timer, &QTimer::timeout, this, [=]() {_fancyWarnWindow->continueBtn->setEnabled(true); });
|
||||
qDebug() << "点击运行背面";
|
||||
}
|
||||
void show()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user