-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ui_PyQtexample.py
196 lines (188 loc) · 11.2 KB
/
Ui_PyQtexample.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/Users/ruanjiyang/Desktop/python/learn/PyQtexample.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 664)
MainWindow.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/pic/最强大脑证书.jpg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(260, 450, 60, 16))
self.label.setObjectName("label")
self.layoutWidget = QtWidgets.QWidget(self.centralwidget)
self.layoutWidget.setGeometry(QtCore.QRect(12, 12, 209, 32))
self.layoutWidget.setObjectName("layoutWidget")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.layoutWidget)
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.pushButton_4 = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton_4.setObjectName("pushButton_4")
self.horizontalLayout_2.addWidget(self.pushButton_4)
self.line_2 = QtWidgets.QFrame(self.layoutWidget)
self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.horizontalLayout_2.addWidget(self.line_2)
self.line = QtWidgets.QFrame(self.layoutWidget)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.horizontalLayout_2.addWidget(self.line)
self.pushButton_5 = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton_5.setObjectName("pushButton_5")
self.horizontalLayout_2.addWidget(self.pushButton_5)
self.layoutWidget1 = QtWidgets.QWidget(self.centralwidget)
self.layoutWidget1.setGeometry(QtCore.QRect(12, 54, 318, 374))
self.layoutWidget1.setObjectName("layoutWidget1")
self.gridLayout = QtWidgets.QGridLayout(self.layoutWidget1)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.frame = QtWidgets.QFrame(self.layoutWidget1)
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.pushButton_1 = QtWidgets.QPushButton(self.frame)
self.pushButton_1.setObjectName("pushButton_1")
self.verticalLayout_2.addWidget(self.pushButton_1)
self.pushButton_2 = QtWidgets.QPushButton(self.frame)
self.pushButton_2.setObjectName("pushButton_2")
self.verticalLayout_2.addWidget(self.pushButton_2)
self.closeWinBtn = QtWidgets.QPushButton(self.frame)
self.closeWinBtn.setObjectName("closeWinBtn")
self.verticalLayout_2.addWidget(self.closeWinBtn)
self.gridLayout.addWidget(self.frame, 0, 0, 1, 1)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.pushButton = QtWidgets.QPushButton(self.layoutWidget1)
self.pushButton.setObjectName("pushButton")
self.verticalLayout.addWidget(self.pushButton)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.verticalLayout.addItem(spacerItem)
self.toolButton = QtWidgets.QToolButton(self.layoutWidget1)
self.toolButton.setObjectName("toolButton")
self.verticalLayout.addWidget(self.toolButton)
self.lineEdit = QtWidgets.QLineEdit(self.layoutWidget1)
self.lineEdit.setObjectName("lineEdit")
self.verticalLayout.addWidget(self.lineEdit)
self.gridLayout.addLayout(self.verticalLayout, 0, 2, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(50, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem1, 0, 1, 1, 1)
self.layoutWidget2 = QtWidgets.QWidget(self.centralwidget)
self.layoutWidget2.setGeometry(QtCore.QRect(12, 438, 220, 64))
self.layoutWidget2.setObjectName("layoutWidget2")
self.gridLayout_2 = QtWidgets.QGridLayout(self.layoutWidget2)
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
self.gridLayout_2.setObjectName("gridLayout_2")
self.pushButton_6 = QtWidgets.QPushButton(self.layoutWidget2)
self.pushButton_6.setObjectName("pushButton_6")
self.gridLayout_2.addWidget(self.pushButton_6, 0, 0, 1, 1)
self.radioButton = QtWidgets.QRadioButton(self.layoutWidget2)
self.radioButton.setObjectName("radioButton")
self.gridLayout_2.addWidget(self.radioButton, 0, 1, 1, 1)
self.checkBox = QtWidgets.QCheckBox(self.layoutWidget2)
self.checkBox.setObjectName("checkBox")
self.gridLayout_2.addWidget(self.checkBox, 1, 0, 1, 1)
self.toolButton_2 = QtWidgets.QToolButton(self.layoutWidget2)
self.toolButton_2.setObjectName("toolButton_2")
self.gridLayout_2.addWidget(self.toolButton_2, 1, 1, 1, 1)
self.textEdit = QtWidgets.QTextEdit(self.centralwidget)
self.textEdit.setGeometry(QtCore.QRect(360, 70, 104, 79))
self.textEdit.setObjectName("textEdit")
self.label_2 = QtWidgets.QLabel(self.centralwidget)
self.label_2.setGeometry(QtCore.QRect(350, 180, 421, 391))
self.label_2.setText("")
self.label_2.setPixmap(QtGui.QPixmap(":/pic/最强大脑证书.jpg"))
self.label_2.setObjectName("label_2")
self.pushButton_3 = QtWidgets.QPushButton(self.centralwidget)
self.pushButton_3.setGeometry(QtCore.QRect(540, 80, 113, 32))
self.pushButton_3.setObjectName("pushButton_3")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 22))
self.menubar.setObjectName("menubar")
self.menuMy_first_windows = QtWidgets.QMenu(self.menubar)
self.menuMy_first_windows.setObjectName("menuMy_first_windows")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.toolBar = QtWidgets.QToolBar(MainWindow)
self.toolBar.setObjectName("toolBar")
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.fileOpenAction = QtWidgets.QAction(MainWindow)
self.fileOpenAction.setCheckable(True)
self.fileOpenAction.setObjectName("fileOpenAction")
self.actionnew = QtWidgets.QAction(MainWindow)
self.actionnew.setObjectName("actionnew")
self.actionClose = QtWidgets.QAction(MainWindow)
self.actionClose.setObjectName("actionClose")
self.addWinAction = QtWidgets.QAction(MainWindow)
self.addWinAction.setObjectName("addWinAction")
self.actiontest = QtWidgets.QAction(MainWindow)
self.actiontest.setObjectName("actiontest")
self.menuMy_first_windows.addAction(self.fileOpenAction)
self.menuMy_first_windows.addAction(self.actionnew)
self.menuMy_first_windows.addAction(self.actionClose)
self.menubar.addAction(self.menuMy_first_windows.menuAction())
self.toolBar.addAction(self.fileOpenAction)
self.toolBar.addAction(self.actionnew)
self.toolBar.addAction(self.addWinAction)
self.toolBar.addAction(self.actionClose)
self.label.setBuddy(self.pushButton_6)
self.retranslateUi(MainWindow)
self.closeWinBtn.clicked.connect(MainWindow.close)
self.pushButton_4.pressed.connect(self.pushButton_5.hide)
self.pushButton_4.released.connect(self.pushButton_5.show)
self.checkBox.clicked['bool'].connect(self.lineEdit.hide)
self.pushButton_3.pressed.connect(self.actiontest.trigger)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.pushButton_1, self.pushButton_2)
MainWindow.setTabOrder(self.pushButton_2, self.closeWinBtn)
MainWindow.setTabOrder(self.closeWinBtn, self.lineEdit)
MainWindow.setTabOrder(self.lineEdit, self.pushButton)
MainWindow.setTabOrder(self.pushButton, self.pushButton_5)
MainWindow.setTabOrder(self.pushButton_5, self.pushButton_6)
MainWindow.setTabOrder(self.pushButton_6, self.toolButton_2)
MainWindow.setTabOrder(self.toolButton_2, self.radioButton)
MainWindow.setTabOrder(self.radioButton, self.checkBox)
MainWindow.setTabOrder(self.checkBox, self.toolButton)
MainWindow.setTabOrder(self.toolButton, self.pushButton_4)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.label.setText(_translate("MainWindow", "TextLabel"))
self.pushButton_4.setText(_translate("MainWindow", "PushButton"))
self.pushButton_5.setText(_translate("MainWindow", "按钮"))
self.pushButton_1.setText(_translate("MainWindow", "PushButton"))
self.pushButton_2.setText(_translate("MainWindow", "PushButton"))
self.closeWinBtn.setText(_translate("MainWindow", "close!!"))
self.pushButton.setText(_translate("MainWindow", "PushButton"))
self.toolButton.setText(_translate("MainWindow", "..."))
self.pushButton_6.setText(_translate("MainWindow", "PushButton"))
self.radioButton.setText(_translate("MainWindow", "RadioButton"))
self.checkBox.setText(_translate("MainWindow", "CheckBox"))
self.toolButton_2.setText(_translate("MainWindow", "..."))
self.pushButton_3.setText(_translate("MainWindow", "PushButton"))
self.menuMy_first_windows.setTitle(_translate("MainWindow", "File"))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))
self.fileOpenAction.setText(_translate("MainWindow", "Open"))
self.fileOpenAction.setToolTip(_translate("MainWindow", "<html><head/><body><p><span style=\" font-weight:600; font-style:italic; text-decoration: underline; color:#fd8008;\">open</span></p></body></html>"))
self.fileOpenAction.setShortcut(_translate("MainWindow", "Meta+A"))
self.actionnew.setText(_translate("MainWindow", "New"))
self.actionClose.setText(_translate("MainWindow", "Close"))
self.addWinAction.setText(_translate("MainWindow", "添加窗体"))
self.addWinAction.setToolTip(_translate("MainWindow", "添加窗体"))
self.actiontest.setText(_translate("MainWindow", "test"))
self.actiontest.setToolTip(_translate("MainWindow", "test"))
import apprcc_rc