qt_demoe/maskwidget/frmmaskwidget.cpp

36 lines
781 B
C++
Raw Normal View History

2019-10-20 02:04:02 +00:00
#pragma execution_character_set("utf-8")
#include "frmmaskwidget.h"
#include "ui_frmmaskwidget.h"
#include "maskwidget.h"
#include "qdialog.h"
2021-03-08 01:04:13 +00:00
#include "qtimer.h"
#include "qdebug.h"
2019-10-20 02:04:02 +00:00
frmMaskWidget::frmMaskWidget(QWidget *parent) : QWidget(parent), ui(new Ui::frmMaskWidget)
{
ui->setupUi(this);
2021-03-08 01:04:13 +00:00
QTimer::singleShot(1000, this, SLOT(initForm()));
2019-10-20 02:04:02 +00:00
}
frmMaskWidget::~frmMaskWidget()
{
delete ui;
exit(0);
}
2021-03-08 01:04:13 +00:00
void frmMaskWidget::initForm()
{
MaskWidget::Instance()->setMainWidget(this->topLevelWidget());
MaskWidget::Instance()->setDialogNames(QStringList() << "frmTest");
}
2019-10-20 02:04:02 +00:00
void frmMaskWidget::on_pushButton_clicked()
{
QDialog d;
d.setObjectName("frmTest");
d.setWindowTitle("遮罩层弹出窗体");
d.resize(400, 300);
d.exec();
}