首页上一页 1 下一页尾页 1 条记录 1/1页
AI图片识别
发表在Python视频课程答疑
2020-07-04 悬赏:5 学分
是否精华
是
否
版块置顶:
是
否
sys PyQt5 QtCoreQtGuiQtWidgets PyQt5.QtCore QSize PyQt5.QtGui QPixmap PyQt5.QtWidgets QFileDialog Ui_Form(): (Form): Form.setObjectName() Form.resize() .horizontalLayoutWidget = QtWidgets.QWidget(Form) .horizontalLayoutWidget.setGeometry(QtCore.QRect()) .horizontalLayoutWidget.setObjectName() .horizontalLayout_4 = QtWidgets.QHBoxLayout(.horizontalLayoutWidget) .horizontalLayout_4.setContentsMargins() .horizontalLayout_4.setObjectName() .label = QtWidgets.QLabel(.horizontalLayoutWidget) .label.setObjectName() .horizontalLayout_4.addWidget(.label) .comboBox = QtWidgets.QComboBox(.horizontalLayoutWidget) .comboBox.setObjectName() .horizontalLayout_4.addWidget(.comboBox) .horizontalLayoutWidget_2 = QtWidgets.QWidget(Form) .horizontalLayoutWidget_2.setGeometry(QtCore.QRect()) .horizontalLayoutWidget_2.setObjectName() .horizontalLayout_5 = QtWidgets.QHBoxLayout(.horizontalLayoutWidget_2) .horizontalLayout_5.setContentsMargins() .horizontalLayout_5.setObjectName() .label_2 = QtWidgets.QLabel(.horizontalLayoutWidget_2) .label_2.setObjectName() .horizontalLayout_5.addWidget(.label_2) .lineEdit = QtWidgets.QLineEdit(.horizontalLayoutWidget_2) .lineEdit.setObjectName() .horizontalLayout_5.addWidget(.lineEdit) .pushButton = QtWidgets.QPushButton(.horizontalLayoutWidget_2) .pushButton.setObjectName() .horizontalLayout_5.addWidget(.pushButton) .label_3 = QtWidgets.QLabel(Form) .label_3.setGeometry(QtCore.QRect()) .label_3.setStyleSheet() .label_3.setObjectName() .verticalLayoutWidget = QtWidgets.QWidget(Form) .verticalLayoutWidget.setGeometry(QtCore.QRect()) .verticalLayoutWidget.setObjectName() .verticalLayout_3 = QtWidgets.QVBoxLayout(.verticalLayoutWidget) .verticalLayout_3.setContentsMargins() .verticalLayout_3.setObjectName() .label_4 = QtWidgets.QLabel(.verticalLayoutWidget) .label_4.setStyleSheet() .label_4.setText() .label_4.setObjectName() .verticalLayout_3.addWidget(.label_4) .pushButton_2 = QtWidgets.QPushButton(.verticalLayoutWidget) .pushButton_2.setStyleSheet() .pushButton_2.setObjectName() .verticalLayout_3.addWidget(.pushButton_2) .retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form) (Form): _translate = QtCore.QCoreApplication.translate Form.setWindowTitle(_translate()) .label.setText(_translate()) .comboBox.addItem(_translate()) .comboBox.addItem(_translate()) .label_2.setText(_translate()) .pushButton.setText(_translate()) .label_3.setText(_translate()) .pushButton_2.setText(_translate()) .pushButton.clicked(.openfile) (): .download_path = QFileDialog.getOpenFileName(.horizontalLayoutWidget/) __name__ == : app = QtWidgets.QApplication(sys.argv) MainWindow = QtWidgets.QMainWindow() ui = Ui_Form() ui.setupUi(MainWindow) MainWindow.show() sys.exit(app.exec_())
加上语句。程序跑不动了。。。啥原因啊
.pushButton.clicked(.openfile) (): .download_path = QFileDialog.getOpenFileName(.horizontalLayoutWidget/)