решение проблемы закрфтия вложенных окон при П.С.

This commit is contained in:
2025-09-18 11:03:58 +03:00
parent 6aab774795
commit 9f4120c2d1
5 changed files with 70 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
#include "dialogcardtrainee.h"
DialogCardTrainee::DialogCardTrainee(ConnectorToServer* connectorToServer, MessangerController* messangerController,
int id_trainee, AMMtasksWidget* ammTasksWidget_common, FIMtasksWidget* fimTasksWidget_common,
QWidget *parent) :
QDialog(parent,
Qt::WindowSystemMenuHint
| Qt::WindowMaximizeButtonHint
| Qt::WindowMinimizeButtonHint
| Qt::WindowCloseButtonHint),
cardTrainee(nullptr)
{
cardTrainee = new PersonalCardTrainee(connectorToServer, messangerController,
id_trainee, ammTasksWidget_common, fimTasksWidget_common, this);
QHBoxLayout *layout = new QHBoxLayout(this);
layout->addWidget(cardTrainee);
this->setWindowTitle(tr("Personal card trainee"));
this->setMinimumSize(1400, 700);
this->setWindowState(Qt::WindowMaximized);
/*this->setWindowFlags(Qt::WindowSystemMenuHint
| Qt::WindowMaximizeButtonHint
| Qt::WindowMinimizeButtonHint
| Qt::WindowCloseButtonHint);*/
this->setModal(true);
}
DialogCardTrainee::~DialogCardTrainee()
{
delete cardTrainee;
}
void DialogCardTrainee::closeEvent(QCloseEvent *event)
{
cardTrainee->close();
}