PyQt5写文件上传窗口代码
时间: 2023-06-18 12:06:44 浏览: 61
可以参考以下代码:from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(400, 300)
self.pushButton = QtWidgets.QPushButton(Form)
self.pushButton.setGeometry(QtCore.QRect(150, 250, 93, 28))
self.pushButton.setObjectName("pushButton")
self.lineEdit = QtWidgets.QLineEdit(Form)
self.lineEdit.setGeometry(QtCore.QRect(80, 250, 53, 28))
self.lineEdit.setObjectName("lineEdit")
self.label = QtWidgets.QLabel(Form)
self.label.setGeometry(QtCore.QRect(80, 220, 281, 16))
self.label.setObjectName("label")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "文件上传"))
self.pushButton.setText(_translate("Form", "上传"))
self.label.setText(_translate("Form", "请输入要上传的文件路径:"))
阅读全文