diff options
Diffstat (limited to 'gui/gui_common.py')
| -rw-r--r-- | gui/gui_common.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/gui_common.py b/gui/gui_common.py new file mode 100644 index 0000000..39bb38c --- /dev/null +++ b/gui/gui_common.py @@ -0,0 +1,12 @@ +from typing import cast +from PySide6.QtGui import QFont +from PySide6.QtWidgets import QApplication + + +def ensure_qt_app() -> QApplication: + app = QApplication.instance() + if app is None: + app = QApplication([]) + app = cast(QApplication, app) + app.setFont(QFont("Calibri", 12)) + return app |
