Я ошибся, нет встроенного сигнала close() у QWidget :)
close();
}
#endif
-}
\ No newline at end of file
+}
+
+void TransactionDescDialog::closeEvent(QCloseEvent *e)
+{
+ emit(stopExec());
+ QWidget::closeEvent(e);
+}
Q_OBJECT
protected:
void keyPressEvent(QKeyEvent *);
+ void closeEvent(QCloseEvent *e);
public:
explicit TransactionDescDialog(const QModelIndex &idx, QWidget *parent = 0);
private:
Ui::TransactionDescDialog *ui;
+
+signals:
+ void stopExec();
};
#endif // TRANSACTIONDESCDIALOG_H
// This loop will wait for the window is closed
QEventLoop loop;
- connect(&dlg, SIGNAL(close()), &loop, SLOT(quit()));
+ connect(&dlg, SIGNAL(stopExec()), &loop, SLOT(quit()));
loop.exec();
}
}