That's about the logic, how to make MessageBox itself, I know. I cram the code into the destructor:
L_9_1K::~L_9_1K() { QMessageBox msgBox; msgBox.show(); msgBox.setText("Cохранить перед выходом?"); msgBox.addButton(QWidget::tr("OК"), QMessageBox::RejectRole); msgBox.addButton(QWidget::tr("отменить"), QMessageBox::RejectRole); msgBox.setIcon(QMessageBox::Information); int res = msgBox.exec(); if (res == QWidget::tr("OК")) saveSettings(); //сохраняет настройки приложения delete ui; if (res == QWidget::tr("Отменить")) delete ui; }` Please tell me where is the error?
closeEvent- Bearded BeaverQMessageBoxcreate / get the result wrong ... - Fat-Zer 2:49 pm