[PATCH 4/4] MainWindow: close all windows once we close the main one
Lubomir I. Ivanov
neolit123 at gmail.com
Tue Mar 11 09:31:01 PDT 2014
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
This is useful if we have more non-modal windows and we want
them simply to close with the main one without explicitly
creating class member variables to point to such instances.
A practical example would be the debug window created in
ProfileWidget2() (diveDepthTableView) which holds
the depth profile values.
Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
qt-ui/mainwindow.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 171161a..1430f7a 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -691,6 +691,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
}
event->accept();
writeSettings();
+ QApplication::closeAllWindows();
}
DiveListView *MainWindow::dive_list()
--
1.7.11.msysgit.0
More information about the subsurface
mailing list