forked from BetaRavener/uPyLoader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
33 lines (24 loc) · 742 Bytes
/
main.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
29
30
31
32
33
import sys
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication
from src.gui.main_window import MainWindow
from src.helpers.pyinstaller_helper import PyInstallerHelper
from src.utility.settings import Settings
__author__ = "Ivan Sevcik"
# Main Function
if __name__ == '__main__':
# Create main app
myApp = QApplication(sys.argv)
myApp.setQuitOnLastWindowClosed(True)
path = PyInstallerHelper.resource_path("icons\\main.png")
icon = QIcon(path)
myApp.setWindowIcon(icon)
try:
sys.argv.index("--debug")
Settings().debug_mode = True
except ValueError:
pass
ex2 = MainWindow()
ex2.show()
# Execute the Application and Exit
sys.exit(myApp.exec_())