-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
29 lines (22 loc) · 780 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
# This Python file uses the following encoding: utf-8
import sys
import os
from PySide2.QtGui import QGuiApplication, QIcon
from PySide2.QtQml import QQmlApplicationEngine
from mainWindow import MainWindow
if __name__ == "__main__":
app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine()
# Get Context
main = MainWindow()
engine.rootContext().setContextProperty("backend", main)
# Set App Extra Info
app.setOrganizationName("Wanderson M. Pimenta")
app.setOrganizationDomain("N/A")
# Set Icon
app.setWindowIcon(QIcon("images/icon.ico"))
# Load Initial Window
engine.load(os.path.join(os.path.dirname(__file__), "qml/splashScreen.qml"))
if not engine.rootObjects():
sys.exit(-1)
sys.exit(app.exec_())