RedPanda-CPP/RedPandaIDE/widgets/infomessagebox.cpp

32 lines
499 B
C++
Raw Normal View History

2022-02-20 21:47:57 +08:00
#include "infomessagebox.h"
#include "ui_infomessagebox.h"
InfoMessageBox::InfoMessageBox(QWidget *parent) :
QDialog(parent),
ui(new Ui::InfoMessageBox)
{
ui->setupUi(this);
}
void InfoMessageBox::setMessage(const QString message)
{
ui->txtMessage->setText(message);
}
InfoMessageBox::~InfoMessageBox()
{
delete ui;
}
2022-02-22 17:12:54 +08:00
void InfoMessageBox::showMessage(const QString message)
{
setMessage(message);
exec();
}
2022-02-20 21:47:57 +08:00
void InfoMessageBox::on_btnOk_clicked()
{
accept();
}