-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.pyw
29 lines (20 loc) · 899 Bytes
/
main.pyw
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
#!/usr/bin/python
import sys
import os
if os.name == 'nt':
# Workaround to get the app icon in the taskbar on Windows
import ctypes
myappid = 'mycompany.myproduct.subproduct.version' # arbitrary string
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
# Workaround to make this script run without a terminal window
if sys.executable.endswith("pythonw.exe"):
sys.stdout = open(os.path.join(os.getenv("TEMP"), os.path.basename(sys.argv[0]) + "-stdout"), 'w')
sys.stderr = open(os.path.join(os.getenv("TEMP"), os.path.basename(sys.argv[0]) + "-stderr"), 'w')
from PyQt6.QtWidgets import QApplication, QStyleFactory
from lib.MainWindow import MainWindow
if __name__ == '__main__':
style = QStyleFactory()
app = QApplication(sys.argv)
app.setStyle(style.create('Fusion'))
window = MainWindow()
sys.exit(app.exec())