-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (24 loc) · 756 Bytes
/
main.py
File metadata and controls
29 lines (24 loc) · 756 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
import sys
import os
from ui.window import MainWindow
from PyQt6.QtWidgets import QApplication
from ui.styles import get_stylesheet, DarkTheme
from PyQt6.QtGui import QIcon
def resource_path(relative_path):
try:
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
def main():
app = QApplication(sys.argv)
app.setApplicationName("Test Editor")
app.setApplicationVersion("1.0.1")
app.setWindowIcon(QIcon(resource_path("resources/testeditor_logo.PNG")))
style_sheet = get_stylesheet(DarkTheme)
app.setStyleSheet(style_sheet)
editor = MainWindow()
editor.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()