-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (27 loc) · 853 Bytes
/
main.py
File metadata and controls
35 lines (27 loc) · 853 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
32
33
34
35
import sys
import signal
from PyQt6.QtWidgets import QApplication
from PyQt6.QtCore import QTimer
from src.gui.MainWindow import MainWindow
if __name__ == "__main__":
app = QApplication(sys.argv)
app.setOrganizationDomain("com")
app.setOrganizationName("ahl")
app.setApplicationName("FramePhantom")
app.setDesktopFileName("framephantom")
app.setDesktopSettingsAware(True)
app.aboutToQuit.connect(lambda: print("Exiting..."))
def on_sigint(signum, frame):
print()
print("SIGINT received")
app.quit()
# Handle Keyboard Interrupts
signal.signal(signal.SIGINT, on_sigint)
timer = QTimer()
timer.start(100)
timer.timeout.connect(lambda: None)
# Create and show the main window
print("Starting...")
window = MainWindow()
window.show()
sys.exit(app.exec())