Use custom close dialog
The custom close dialog provides translated buttons
This commit is contained in:
parent
7b7b92b6a3
commit
960258eba3
1 changed files with 3 additions and 5 deletions
|
@ -397,11 +397,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
"""
|
"""
|
||||||
Close the application. A warning is shown before.
|
Close the application. A warning is shown before.
|
||||||
"""
|
"""
|
||||||
reply = QMessageBox.question(self, "Sicher?",
|
dialog = CloseDialog()
|
||||||
"Möchten Sie wirklich schließen?",
|
dialog.accepted.connect(self.close)
|
||||||
QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
|
dialog.exec_()
|
||||||
if reply == QMessageBox.Yes:
|
|
||||||
self.close()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Reference in a new issue