#include "showcrc.h" #include "ui_showcrc.h" showCRC::showCRC(QWidget *parent) : QDialog(parent), ui(new Ui::showCRC) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); ((Widget*)parent)->changeOpenWidget(this); } showCRC::~showCRC() { delete ui; } void showCRC::on_pushButton_clicked() { close(); } void showCRC::closeEvent(QCloseEvent *event) { ((Widget*)parent())->clearOpenWidget(); event->accept(); }