-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMainControl.py
More file actions
32 lines (25 loc) · 764 Bytes
/
MainControl.py
File metadata and controls
32 lines (25 loc) · 764 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
import Main as MM
import ImageCollect as ImgColl
import PyQt5
from PyQt5.QtWidgets import QApplication, QMainWindow, QDialog
import sys
class parentWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
self.main_ui = MM.Ui_MainWindow()
self.main_ui.setupUi(self)
class childWindow(QDialog):
def __init__(self):
QDialog.__init__(self)
self.child = ImgColl.Ui_ImgCollWin()
self.child.setupUi(self)
if __name__ == '__main__':
app = QApplication(sys.argv)
window = parentWindow()
child = childWindow()
# 通过toolButton将两个窗体关联
btn = window.main_ui.btnImageCollect
btn.clicked.connect(child.show)
# 显示
window.show()
sys.exit(app.exec_())