-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
executable file
·48 lines (29 loc) · 955 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python3
import sys
from PySide2.QtUiTools import QUiLoader
from PySide2.QtWidgets import QApplication, QMainWindow
from PySide2.QtCore import QFile
from twisted.internet.error import ReactorAlreadyInstalledError
from mainwindow import Ui_MainWindow
class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.setupUi(self)
if __name__ == "__main__":
qtapp = QApplication(sys.argv)
import qt5reactor
try:
qt5reactor.install()
except ReactorAlreadyInstalledError:
pass
from twisted.internet import reactor
#file = QFile("mainwindow.ui")
#file.open(QFile.ReadOnly)
#loader = QUiLoader()
#mainwindow = loader.load(file)
mainwindow = MainWindow()
from app import WormholeGui
wgui = WormholeGui(qtapp, mainwindow)
mainwindow.show()
#sys.exit(app.exec_())
reactor.run()