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/)


分享到:
精彩评论 1
syf827522
学分:52 LV3
2020-07-04
沙发
加上下边语句就不能跑了。    .pushButton.clicked(.openfile)
    ():
        .download_path = QFileDialog.getOpenFileName(.horizontalLayoutWidget/)


首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照