32 lines
515 B
C++
32 lines
515 B
C++
![]() |
#include "msgbox.h"
|
||
|
#include "ui_msgbox.h"
|
||
|
|
||
|
msgBox::msgBox(QWidget *parent)
|
||
|
: QWidget(parent)
|
||
|
, ui(new Ui::msgBox)
|
||
|
{
|
||
|
ui->setupUi(this);
|
||
|
this->setWindowFlags(Qt::FramelessWindowHint);//去除窗口边框
|
||
|
this->setFixedSize(250,150);
|
||
|
|
||
|
|
||
|
setAttribute(Qt::WA_TranslucentBackground);
|
||
|
ui->widget->setFixedSize(250,37);
|
||
|
}
|
||
|
|
||
|
msgBox::~msgBox()
|
||
|
{
|
||
|
delete ui;
|
||
|
}
|
||
|
|
||
|
void msgBox::on_pushButton_clicked()
|
||
|
{
|
||
|
this->close();
|
||
|
}
|
||
|
|
||
|
void msgBox::getzhuangtai(QString str)
|
||
|
{
|
||
|
ui->label->setText(str);
|
||
|
|
||
|
}
|