From b382228b7dccc8e2c6b4af6ae23e0a285055c454 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Tue, 11 Mar 2014 18:31:01 +0200 Subject: MainWindow: close all windows once we close the main one 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 Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 20f463cf0..ccba66d70 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -651,6 +651,7 @@ void MainWindow::closeEvent(QCloseEvent *event) } event->accept(); writeSettings(); + QApplication::closeAllWindows(); } DiveListView *MainWindow::dive_list() -- cgit v1.2.3-70-g09d2