forked from Callum-Irving/mask-detector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqt_interface.py
More file actions
42 lines (30 loc) · 1.17 KB
/
Copy pathqt_interface.py
File metadata and controls
42 lines (30 loc) · 1.17 KB
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
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWidgets import QMainWindow
from qt_interface_styled import Ui_MainWindow
class MainWindow:
def __init__(self):
self.main_win = QMainWindow()
self.ui = Ui_MainWindow()
self.ui.setupUi(self.main_win)
self.ui.stackedWidget.setCurrentWidget(self.ui.page)
self.ui.pushButton.clicked.connect(self.goDashboard)
self.ui.pushButton_5.clicked.connect(self.goHome)
self.ui.pushButton_3.clicked.connect(self.goFiles)
self.ui.pushButton_4.clicked.connect(self.goVideo)
self.ui.pushButton_6.clicked.connect(self.goDashboard)
self.ui.pushButton_7.clicked.connect(self.goDashboard)
def show(self):
self.main_win.show()
def goDashboard(self):
self.ui.stackedWidget.setCurrentWidget(self.ui.page_2)
def goHome(self):
self.ui.stackedWidget.setCurrentWidget(self.ui.page)
def goVideo(self):
self.ui.stackedWidget.setCurrentWidget(self.ui.page_3)
def goFiles(self):
self.ui.stackedWidget.setCurrentWidget(self.ui.page_4)
app = QApplication(sys.argv)
win = MainWindow()
win.show()
sys.exit(app.exec_())