资源简介


资源截图

代码片段和文件信息

import sys
from PyQt5 import QtWidgets QtCore
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QFileDialog
import requests
import base64



class Ui_imageAI(object):
    def setupUi(self imageAI):
        imageAI.setobjectName(“imageAI“)
        imageAI.resize(724 489)    # 设置窗体大小

        # 图片显示控件
        self.image = QtWidgets.QLabel(imageAI)
        self.image.setGeometry(QtCore.QRect(96 140 311 301))
        self.image.setstyleSheet(“border-width: 1px;border-style: solid;border-color: rgb(0 0 0);“)

        self.widget = QtWidgets.QWidget(imageAI)
        self.widget.setGeometry(QtCore.QRect(110 50 221 31))
        self.widget.setobjectName(“widget“)
        # 选择识别类型
        self.label = QtWidgets.QLabel(self.widget)
        self.label.setobjectName(“label“)
        # 下拉控件,用于选择识别类型
        self.comboBox = QtWidgets.QComboBox(self.widget)
        self.comboBox.setobjectName(“comboBox“)
        self.comboBox.addItem(““)
        self.comboBox.addItem(““)
        self.comboBox.addItem(““)
        # 横向布局容器,包含 self.label self.comboBox
        self.HBoxLayout = QtWidgets.QHBoxLayout(self.widget)
        self.HBoxLayout.setContentsMargins(0 0 0 0)
        self.HBoxLayout.setobjectName(“HBoxLayout“)
        self.HBoxLayout.addWidget(self.label)
        self.HBoxLayout.addWidget(self.comboBox)

        self.widget2 = QtWidgets.QWidget(imageAI)
        self.widget2.setGeometry(QtCore.QRect(96 90 318 31))
        self.widget2.setobjectName(“widget2“)
        # 选择要识别的图片
        self.label2 = QtWidgets.QLabel(self.widget2)
        self.label2.setobjectName(“label2“)
        # 图片路径显示
        self.lineEdit = QtWidgets.QLineEdit(self.widget2)
        self.lineEdit.setobjectName(“lineEdit“)
        # 图片路径选择Button
        self.pushButton = QtWidgets.QPushButton(self.widget2)
        self.pushButton.setobjectName(“pushButton“)
        # 横向布局容器,包含 self.label2 self.lineEdit self.pushButton
        self.HBoxLayout2 = QtWidgets.QHBoxLayout(self.widget2)
        self.HBoxLayout2.setContentsMargins(0 0 0 0)
        self.HBoxLayout2.setobjectName(“HBoxLayout2“)
        self.HBoxLayout2.addWidget(self.label2)
        self.HBoxLayout2.addWidget(self.lineEdit)
        self.HBoxLayout2.addWidget(self.pushButton)

        self.widget3 = QtWidgets.QWidget(imageAI)
        self.widget3.setGeometry(QtCore.QRect(450 50 201 401))
        self.widget3.setobjectName(“widget3“)
        # 显示识别的结果
        self.label3 = QtWidgets.QLabel(self.widget3)
        self.label3.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label3.setWordWrap(True)
        self.label3.setstyleSheet(“border-width: 1px;border-style: solid;border-color: rgb(0 0 0);“)
        self.label3.setobjectName(“label3“)
        # 复制Button
        self.pushButton2 = QtWidgets.QPushButton(self.widget3)
        self.pushButton2.setobjectName(“pushButton2“)
        # 垂

评论

共有 条评论