#include "msgbox_2.h" #include "ui_msgbox_2.h" msgbox_2::msgbox_2(QWidget *parent) : QDialog(parent) , ui(new Ui::msgbox_2) { ui->setupUi(this); this->setWindowFlags(Qt::FramelessWindowHint);//去除窗口边框 this->setFixedSize(380,250); setAttribute(Qt::WA_TranslucentBackground); ui->widget->setFixedSize(380,57); ui->pushButton->setFixedSize(80,34); } msgbox_2::~msgbox_2() { delete ui; } void msgbox_2::on_pushButton_clicked() { this->close(); } void msgbox_2::getzhuangtai(QString str) { ui->label->setText(str); }