#-*- coding: utf-8 -*-
#Form implementation generated from reading ui file 'login.ui'#
#Created by: PyQt5 UI code generator 5.11.3#
#WARNING! All changes made in this file will be lost!
from PyQt5 importQtCore, QtGui, QtWidgetsclassUi_Form(object):defsetupUi(self, Form):
Form.setObjectName("Form")
Form.resize(552, 288)
self.username=QtWidgets.QLabel(Form)
self.username.setGeometry(QtCore.QRect(90, 90, 48, 20))
self.username.setObjectName("username")
self.username_2=QtWidgets.QLabel(Form)
self.username_2.setGeometry(QtCore.QRect(90, 130, 48, 20))
self.username_2.setObjectName("username_2")
self.layoutWidget=QtWidgets.QWidget(Form)
self.layoutWidget.setGeometry(QtCore.QRect(140, 130, 189, 22))
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.lineEdit_2=QtWidgets.QLineEdit(self.layoutWidget)
self.lineEdit_2.setObjectName("lineEdit_2")
self.horizontalLayout_2.addWidget(self.lineEdit_2)
self.radioButton=QtWidgets.QRadioButton(Form)
self.radioButton.setGeometry(QtCore.QRect(150, 180, 131, 16))
self.radioButton.setObjectName("radioButton")
self.pushButton_2=QtWidgets.QPushButton(Form)
self.pushButton_2.setGeometry(QtCore.QRect(180, 220, 75, 23))
self.pushButton_2.setObjectName("pushButton_2")
self.widget=QtWidgets.QWidget(Form)
self.widget.setGeometry(QtCore.QRect(140, 90, 189, 22))
self.widget.setObjectName("widget")
self.horizontalLayout=QtWidgets.QHBoxLayout(self.widget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.lineEdit=QtWidgets.QLineEdit(self.widget)
self.lineEdit.setObjectName("lineEdit")
self.horizontalLayout.addWidget(self.lineEdit)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)defretranslateUi(self, Form):
_translate=QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.username.setText(_translate("Form", "用户名:"))
self.username_2.setText(_translate("Form", "密码:"))
self.radioButton.setText(_translate("Form", "记住用户名和密码"))
self.pushButton_2.setText(_translate("Form", "登录"))if __name__ == "__main__":importsysfrom PyQt5.QtGui importQIcon
app=QtWidgets.QApplication(sys.argv)
widget=QtWidgets.QWidget()
ui=Ui_Form()
ui.setupUi(widget)
widget.setWindowIcon(QIcon('web.png')) #增加icon图标,如果没有图片可以没有这句
widget.show()
sys.exit(app.exec_())