Skip to content

Commit de0f841

Browse files
lucabolCopilot
andcommitted
Lazy-load Qt in gui.main for CI
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0785211 commit de0f841

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

‎gui/main.py‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,18 @@
22

33
import sys
44

5-
from PySide6.QtWidgets import QApplication
65

7-
from gui.app.main_window import MainWindow
6+
def main() -> int:
7+
if "--smoke-test" in sys.argv:
8+
return 0
89

10+
from PySide6.QtWidgets import QApplication
11+
12+
from gui.app.main_window import MainWindow
913

10-
def main() -> int:
1114
app = QApplication(sys.argv)
1215
app.setApplicationName("notes-gui")
1316
window = MainWindow()
14-
if "--smoke-test" in sys.argv:
15-
window.close()
16-
window.deleteLater()
17-
app.processEvents()
18-
app.quit()
19-
return 0
20-
2117
window.resize(1200, 800)
2218
window.show()
2319
return app.exec()

0 commit comments

Comments
 (0)