-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (22 loc) · 721 Bytes
/
main.py
File metadata and controls
31 lines (22 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# main.py
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QTimer
from modules.gui import MainWindow, global_exception_handler
def main():
# Set the global exception handler
sys.excepthook = global_exception_handler
app = QApplication(sys.argv)
# Create the main window
window = MainWindow()
# Show the main window immediately
window.show()
# Use QTimer to defer initialization of advanced UI components
QTimer.singleShot(0, window.init_advanced_ui)
# Use timer to allow for proper shutdown
timer = QTimer()
timer.timeout.connect(lambda: None)
timer.start(100)
sys.exit(app.exec_())
if __name__ == '__main__':
main()