From 3b9a9e02bc302eb96e28cae24990528ce4b9cbaf Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 10 Sep 2018 12:32:14 +0200 Subject: [PATCH] close all top-level widgets when about to quit event loop --- src/Gui/MainWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 68e2c1f9c7..aea5651005 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -976,8 +976,10 @@ void MainWindow::closeEvent (QCloseEvent * e) } /*emit*/ mainWindowClosed(); - if (this->property("QuitOnClosed").isValid()) + if (this->property("QuitOnClosed").isValid()) { + QApplication::closeAllWindows(); qApp->quit(); // stop the event loop + } } }