[size=1em][size=1em]# -*- coding: utf-8 -*-
[size=1em]
[size=1em]# Form implementation generated from reading ui file 'untitled.ui'
[size=1em]#
[size=1em]# Created by: PyQt5 UI code generator 5.15.1
[size=1em]#
[size=1em]# WARNING: Any manual changes made to this file will be lost when pyuic5 is
[size=1em]# run again. Do not edit this file unless you know what you are doing.
[size=1em]
[size=1em]import sys
[size=1em]from PyQt5 import QtCore, QtGui, QtWidgets
[size=1em]
[size=1em]
[size=1em]class Ui_MainWindow(object):
[size=1em] def setupUi(self, MainWindow):
[size=1em] MainWindow.setObjectName("MainWindow")
[size=1em] MainWindow.resize(800, 600)
[size=1em] self.centralwidget = QtWidgets.QWidget(MainWindow)
[size=1em] self.centralwidget.setObjectName("centralwidget")
[size=1em] self.pushButton = QtWidgets.QPushButton(self.centralwidget)
[size=1em] self.pushButton.setGeometry(QtCore.QRect(80, 40, 75, 23))
[size=1em] self.pushButton.setObjectName("pushButton")
[size=1em] self.listView = QtWidgets.QListView(self.centralwidget)
[size=1em] self.listView.setGeometry(QtCore.QRect(210, 40, 256, 192))
[size=1em] self.listView.setObjectName("listView")
[size=1em] self.radioButton = QtWidgets.QRadioButton(self.centralwidget)
[size=1em] self.radioButton.setGeometry(QtCore.QRect(80, 120, 89, 16))
[size=1em] self.radioButton.setObjectName("radioButton")
[size=1em] MainWindow.setCentralWidget(self.centralwidget)
[size=1em] self.menubar = QtWidgets.QMenuBar(MainWindow)
[size=1em] self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23))
[size=1em] self.menubar.setObjectName("menubar")
[size=1em] MainWindow.setMenuBar(self.menubar)
[size=1em] self.statusbar = QtWidgets.QStatusBar(MainWindow)
[size=1em] self.statusbar.setObjectName("statusbar")
[size=1em] MainWindow.setStatusBar(self.statusbar)
[size=1em]
[size=1em] self.retranslateUi(MainWindow)
[size=1em] QtCore.QMetaObject.connectSlotsByName(MainWindow)
[size=1em]
[size=1em] def retranslateUi(self, MainWindow):
[size=1em] _translate = QtCore.QCoreApplication.translate
[size=1em] MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
[size=1em] self.pushButton.setText(_translate("MainWindow", "
ushButton"))
[size=1em] self.radioButton.setText(_translate("MainWindow", "RadioButton"))
[size=1em]
[size=1em]if __name__ == "__main__":
[size=1em] app = QtWidgets.QApplication(sys.argv)
[size=1em] # 创建窗体对象
[size=1em] MainWindow = QtWidgets.QMainWindow()
[size=1em] # 创建Pyqt窗体对象
[size=1em] pyui = Ui_MainWindow()
[size=1em] pyui.setupUi(MainWindow)
[size=1em] MainWindow.show()
[size=1em] sys.exit(app.exec_())