forked from jianchang512/pyvideotrans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbox.py
26 lines (23 loc) · 791 Bytes
/
box.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
# -*- coding: utf-8 -*-
import os
import sys
from PyQt5.QtWidgets import QApplication
from videotrans.box.win import MainWindow
from videotrans.configure import config
from videotrans.configure.config import homedir
if __name__ == "__main__":
if not os.path.exists(homedir):
os.makedirs(homedir, exist_ok=True)
if not os.path.exists(homedir + "/tmp"):
os.makedirs(homedir + "/tmp", exist_ok=True)
app = QApplication(sys.argv)
main = MainWindow()
try:
with open(f'{config.rootdir}/videotrans/styles/style.qss', 'r', encoding='utf-8') as f:
main.setStyleSheet(f.read())
import qdarkstyle
app.setStyleSheet(qdarkstyle.load_stylesheet(qt_api='pyqt5'))
except:
pass
main.show()
sys.exit(app.exec())