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
| # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'clearWaterPrintGui.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(400, 300) self.label_DirPath = QtWidgets.QLabel(Form) self.label_DirPath.setGeometry(QtCore.QRect(16, 52, 72, 15)) self.label_DirPath.setObjectName("label_DirPath") self.label_ExtName = QtWidgets.QLabel(Form) self.label_ExtName.setGeometry(QtCore.QRect(31, 112, 72, 15)) self.label_ExtName.setObjectName("label_ExtName") self.buttonBox = QtWidgets.QDialogButtonBox(Form) self.buttonBox.setGeometry(QtCore.QRect(190, 260, 193, 28)) self.buttonBox.setInputMethodHints(QtCore.Qt.ImhNone) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) self.buttonBox.setObjectName("buttonBox") self.lineEdit_DirPath = QtWidgets.QLineEdit(Form) self.lineEdit_DirPath.setGeometry(QtCore.QRect(100, 50, 281, 21)) self.lineEdit_DirPath.setObjectName("lineEdit_DirPath") self.lineEdit_ExtName = QtWidgets.QLineEdit(Form) self.lineEdit_ExtName.setGeometry(QtCore.QRect(100, 112, 281, 21)) self.lineEdit_ExtName.setObjectName("lineEdit_ExtName")
self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form): _translate = QtCore.QCoreApplication.translate Form.setWindowTitle(_translate("Form", "Form")) self.label_DirPath.setText(_translate("Form", "文件路径:")) self.label_ExtName.setText(_translate("Form", "扩展名:"))
# 下面代码是手动添加的 if __name__=="__main__": import sys from PyQt5.QtGui import QIcon 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_())
|