From 29daec40e5930c88928e9ad558abe856e446cca9 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sun, 3 May 2020 17:23:20 +0200 Subject: [PATCH] Better functions for closing and executing --- wikicookbook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wikicookbook.py b/wikicookbook.py index 5fc3966..ceef5a0 100644 --- a/wikicookbook.py +++ b/wikicookbook.py @@ -283,10 +283,10 @@ class MainWindow(QMainWindow, Ui_MainWindow): "Möchten Sie wirklich schließen?", QMessageBox.Yes | QMessageBox.No, QMessageBox.No) if reply == QMessageBox.Yes: - sys.exit(0) + super.close() if __name__ == "__main__": app = QApplication([]) app.setApplicationName("WikiCookBook") window = MainWindow() - app.exec_() + sys.exit(app.exec_())