-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (27 loc) · 804 Bytes
/
main.py
File metadata and controls
33 lines (27 loc) · 804 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
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import Qt
import sys
from editor import *
import data
if __name__ == "__main__":
# Loads default images into memory
with open("res/default.png", "rb") as f:
i = f.read()
data.DEFAULT_IMAGE = bytearray(i)
with open("res/empty.png", "rb") as f:
i = f.read()
data.EMPTY_IMAGE = bytearray(i)
with open("res/logo.png", "rb") as f:
i = f.read()
data.LOGO_IMAGE = bytearray(i)
# Loads stylesheet
with open("res/style.qss", "r") as f:
style = f.read()
# Initializes Qt
app = QApplication(sys.argv)
app.setStyle("Fusion")
# Initializes & executes main window
main = SDOPWindow(style)
main.show()
sys.exit(app.exec_())