-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMDG.py
28 lines (22 loc) · 764 Bytes
/
MDG.py
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
import ctypes
import faulthandler
import multiprocessing
import sys
from PySide6.QtWidgets import QApplication
from MDGUi.generate_ui import generate_ui
from MDGUtil import PathUtils
from MDGUtil.MDGLogger import MDGLogger
if __name__ == '__main__':
multiprocessing.freeze_support()
faulthandler.enable()
if PathUtils.check_pyinstaller_env():
ctypes.windll.user32.ShowWindow(ctypes.windll.kernel32.GetConsoleWindow(), 6) # Hide console
else:
generate_ui()
"""generate_ui() can change ui so,we need to import MDGMainWindow only after that line"""
from MDGWindow.MDGMainWindow import MDGMainWindow
MDGLogger()
app = QApplication(sys.argv)
widget = MDGMainWindow()
widget.show()
sys.exit(app.exec())