Use custom close dialog

The custom close dialog provides translated buttons
This commit is contained in:
Marcel Kapfer 2020-09-11 00:07:16 +02:00
parent 7b7b92b6a3
commit 960258eba3
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -397,11 +397,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
"""
Close the application. A warning is shown before.
"""
reply = QMessageBox.question(self, "Sicher?",
"Möchten Sie wirklich schließen?",
QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
if reply == QMessageBox.Yes:
self.close()
dialog = CloseDialog()
dialog.accepted.connect(self.close)
dialog.exec_()
if __name__ == "__main__":