close all top-level widgets when about to quit event loop
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user