We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8149458 commit ed976e4Copy full SHA for ed976e4
src/run.py
@@ -1,7 +1,7 @@
1
import argparse
2
import sys
3
from PySide6.QtCore import QLibraryInfo, QLocale, QTranslator
4
-from PySide6.QtWidgets import QApplication, QDialog
+from PySide6.QtWidgets import QApplication, QDialog, QDialogButtonBox
5
from YearCalculator import YearCalculatorDialog
6
7
@@ -72,8 +72,9 @@ def main():
72
calendar_type = YearCalculatorDialog.CALENDARS.DEFAULT
73
74
dlg = YearCalculatorDialog(gregorian_year, native_year, calendar_type)
75
- if dlg.exec() == QDialog.Accepted:
76
- print(dlg.year(), '=', dlg.nativeYear())
+ dlg.buttonBox.clear()
+ dlg.buttonBox.addButton(QDialogButtonBox.Close)
77
+ dlg.exec()
78
79
80
if __name__ == "__main__":
0 commit comments