Qt 实现简易串口助手

界面预览:
在这里插入图片描述
代码如下:
.h文件

#pragma once

#include <QtWidgets/QMainWindow>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QTimer>

#include "ui_MainWin.h"

class MainWin : public QMainWindow
{
    Q_OBJECT

public:
    MainWin(QWidget *parent = Q_NULLPTR);
private:
    void initUi();
    void initConnect();
    void sendDataProcess();
    void disconnectPort();
private slots:
    void updateLocalTime();
    void checkTimeout();
    void handleSerialError(QSerialPort::SerialPortError error);

    void onOpenPort();
    void onSendData();
    void onReadData();
    void onTimedData(bool checked);
    void onReceiveAreaStyle(bool checked);
    void onChangeReceivedDataFormat(bool checked);
    void onClearSendData();
    void onClearReceivedData();
    void onStopDisplay(bool checked);
    void onOpenCalculator();
    void onTimeCycleTextFormat();
    void modifySendDataFormatSlot();
    void sendDataChangeSlot();
private:
    Ui::MainWinClass ui;
    QList<QSerialPortInfo> m_portInfo;  // 可用端口列表
    QList<QString> m_portNames;         // 可用端口列表
    QSerialPort* m_pSerial;             // 连接串口端口
    QTimer m_timer;                     // 更新当前系统时间
    QTimer m_timedSend;                 // 定时发送
    QTimer m_serialPortTimer;           // 定时检测端口是否连接
    QString m_textData;                 // 文本数据缓冲区
    QString m_hexData;                  // 十六进制数据缓冲区
    bool linkState = false;             // 端口连接状态
    qint64 receiveByte = 0;             // 记录接收字节数
    qint64 sendByte = 0;                // 记录发送字节数
};

.cpp文件

#include "MainWin.h"

#include <QMessageBox>
#include <QTextCodec>
#include <QDataStream>
#include <QListView>
#include <QProcess>
#include <QTime>
#include <QDebug>

#if _MSC_VER > 1600
#pragma execution_character_set("utf-8")
#endif // _MSC_VER > 1600

MainWin::MainWin(QWidget *parent)
    : QMainWindow(parent)
{
    ui.setupUi(this);
    initUi();
}

void MainWin::initUi()
{
    setWindowTitle("串口助手");
    setWindowIcon(QIcon(":/image/logo.png"));
    ui.serialStateBtn->setIconSize(QSize(30, 30));
    ui.serialStateBtn->setIcon(QIcon(":/image/closeSerial.png"));
    // 设置初始接收区为,绿字黑底
    ui.receiveTxb->setStyleSheet("background-color: rgb(0, 0, 0);"
        "color: rgb(0, 255, 0);");
    m_pSerial = new QSerialPort;
    // 更新显示时间
    connect(&m_timer, &QTimer::timeout, this, &MainWin::updateLocalTime);
    m_timer.start(1000);

    // 检测端口是否连接
    connect(&m_serialPortTimer, &QTimer::timeout, this, &MainWin::checkTimeout);
    m_serialPortTimer.start(1000);
    connect(m_pSerial, QOverload<QSerialPort::SerialPortError>::of(&QSerialPort::error), this, &MainWin::handleSerialError);

    // 定时发送
    connect(&m_timedSend, &QTimer::timeout, this, [=]() {
        if ((ui.sendTxd->toPlainText() == "") || (linkState == false))
            return;
        this->sendDataProcess();
        });
    // 周期范围1-1000000
    ui.cycleLd->setValidator(new QIntValidator(1, 1000000, this));

    // 为了使下拉条目样式起效
    ui.portNumCbx->setView(new QListView);
    ui.baudCbx->setView(new QListView);
    ui.dataBitCbx->setView(new QListView);
    ui.stopBitCbx->setView(new QListView);
    ui.parityBitCbx->setView(new QListView);

    initConnect();
}

void MainWin::initConnect()
{
    // 打开端口
    connect(ui.serialStateBtn, &QPushButton::clicked, this, &MainWin::onOpenPort);
    // 发送数据
    connect(ui.sendBtn, &QPushButton::clicked, this, &MainWin::onSendData);
    // 清空发送数据
    connect(ui.clearSendBtn, &QPushButton::clicked, this, &MainWin::onClearSendData);
    // 清空接收数据
    connect(ui.clearReceiveBtn, &QPushButton::clicked, this, &MainWin::onClearReceivedData);
    // 停止接收数据显示
    connect(ui.displayStateBtn, &QPushButton::clicked, this, &MainWin::onStopDisplay);
    // 定时发送数据
    connect(ui.timerChk, &QCheckBox::clicked, this, &MainWin::onTimedData);
    // 修改接收数据区样式
    connect(ui.receiveStyleChk, &QCheckBox::clicked, this, &MainWin::onReceiveAreaStyle);
    // 修改接收数据格式
    connect(ui.receiveFormatChk, &QCheckBox::clicked, this, &MainWin::onChangeReceivedDataFormat);
    // 修改接收数据格式
    connect(ui.sendFormatChk, &QCheckBox::clicked, this, &MainWin::modifySendDataFormatSlot);
    // 发送框数据变化
    connect(ui.sendTxd, &QTextEdit::textChanged, this, &MainWin::sendDataChangeSlot);
    // 打开计算器
    connect(ui.calculatorBtn, &QPushButton::clicked, this, &MainWin::onOpenCalculator);

    // 定时周期(文本格式)
    connect(ui.cycleLd, &QLineEdit::inputRejected, this, &MainWin::onTimeCycleTextFormat);
    connect(ui.cycleLd, &QLineEdit::textEdited, this, &MainWin::onTimeCycleTextFormat);
}

// 处理要发送的数据
void MainWin::sendDataProcess()
{
    if (ui.sendFormatChk->isChecked()) // 16进制
    {
        // 转换文本
        QString strHex = ui.sendTxd->toPlainText();
        strHex.remove(QRegExp("\\s"));  // 删除所有空格
        if (strHex.size() % 2 != 0)     // 奇数删掉最后一个字符
        {
            strHex = strHex.left(strHex.size() - 1);
        }

        // 是否加换行符
        if (ui.newLineChk->isChecked())
        {
            strHex += "0D 0A";
        }

        QByteArray text = QByteArray::fromHex(strHex.toUtf8());
        // 发送数据
        m_pSerial->write(text);
        m_pSerial->waitForBytesWritten();

        // 记录发送数据量
        sendByte += text.size();
        ui.sendByteLbl->setText("S:" + QString::number(sendByte));
    }
    else
    {
        QString data = ui.sendTxd->toPlainText();
        data.replace("\n", "\r\n");  // 将\n换成\r\n

        // 是否加换行符
        if (ui.newLineChk->isChecked())
        {
            data += "\r\n";
        }
        // 发送数据
        m_pSerial->write(data.toLocal8Bit());
        m_pSerial->waitForBytesWritten();

        // 记录发送数据量
        sendByte += data.toLocal8Bit().size();
        ui.sendByteLbl->setText("S:" + QString::number(sendByte));
    }
}

void MainWin::disconnectPort()
{
    ui.portNumCbx->setEnabled(true);
    ui.baudCbx->setEnabled(true);
    ui.dataBitCbx->setEnabled(true);
    ui.stopBitCbx->setEnabled(true);
    ui.parityBitCbx->setEnabled(true);
    linkState = false;
    m_pSerial->close();
    ui.serialStateBtn->setText("打开串口");
    ui.serialStateBtn->setIcon(QIcon(":/image/closeSerial.png"));
}

// 显示当前时间
void MainWin::updateLocalTime()
{
    ui.localTimeLbl->setText("当前时间:" + QTime::currentTime().toString("hh:mm:ss"));
}

// 串口连接中断开错误
void MainWin::handleSerialError(QSerialPort::SerialPortError error)
{
    //QSerialPort::ResourceError
    qDebug() << error;
    if (error == QSerialPort::PermissionError) {
        disconnectPort();
    }
}

// 检测端口是否断开
void MainWin::checkTimeout()
{
    // 获取可用端口
    QList<QSerialPortInfo> portInfo = QSerialPortInfo::availablePorts();
    QList<QString> portNames;
    // 添加新增的端口
    foreach(QSerialPortInfo info, portInfo)
    {
        portNames.append(info.portName());
        // 跳过重复的
        if (-1 == ui.portNumCbx->findText(info.portName()))
        {
            ui.portNumCbx->addItem(info.portName());
            m_portNames.append(info.portName());
        }
    }
    // 移除已不存在的端口
    foreach(QString portName, m_portNames)
    {
        if (!portNames.contains(portName))
        {
            m_portNames.removeOne(portName);
            ui.portNumCbx->removeItem(ui.portNumCbx->findText(portName));
        }
    }
}

// 打开端口
void MainWin::onOpenPort()
{
    if (linkState == false)
    {
        // 设置端口号
        m_pSerial->setPort(QSerialPortInfo(ui.portNumCbx->currentText()));
        // 设置波特率
        m_pSerial->setBaudRate(ui.baudCbx->currentText().toInt());
        // 设置数据位
        switch (ui.dataBitCbx->currentIndex())
        {
        default:
        case 0:
            m_pSerial->setDataBits(QSerialPort::Data8);
            break;
        case 1:
            m_pSerial->setDataBits(QSerialPort::Data7);
            break;
        case 2:
            m_pSerial->setDataBits(QSerialPort::Data6);
            break;
        case 3:
            m_pSerial->setDataBits(QSerialPort::Data5);
            break;
        }
        // 设置停止位
        switch (ui.stopBitCbx->currentIndex())
        {
        default:
        case 0:
            m_pSerial->setStopBits(QSerialPort::OneStop);
            break;
        case 1:
            m_pSerial->setStopBits(QSerialPort::OneAndHalfStop);
            break;
        case 2:
            m_pSerial->setStopBits(QSerialPort::TwoStop);
            break;
        }
        // 设置校验位
        switch (ui.parityBitCbx->currentIndex())
        {
            // 无校验
        default:
        case 0:
            m_pSerial->setParity(QSerialPort::NoParity);
            break;
            // 奇校验
        case 1:
            m_pSerial->setParity(QSerialPort::OddParity);
            break;
            //偶校验
        case 2:
            m_pSerial->setParity(QSerialPort::EvenParity);
            break;
        }
        if (!m_pSerial->open(QIODevice::ReadWrite))
        {
            //qDebug()<<m_pSerial->error();
            //QMessageBox::critical(this, "错误提示", "串口打开失败!!!\n串口被占用或者其它错误", "确定");
            QMessageBox msgbox(this);
            msgbox.setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::Dialog);
            msgbox.setWindowTitle("错误");
            msgbox.setIcon(QMessageBox::Critical);
            msgbox.setText("串口打开失败!!!\n串口被占用或者其它错误");
            msgbox.addButton("确定", QMessageBox::AcceptRole);
            msgbox.setStyleSheet("QMessageBox {background-color: rgb(240,240,240);}QMessageBox QLabel#qt_msgbox_label{min-width: 180px;min-height: 40px;background-color:transparent;}");
            msgbox.exec();
            return;
        }
        ui.portNumCbx->setEnabled(false);
        ui.baudCbx->setEnabled(false);
        ui.dataBitCbx->setEnabled(false);
        ui.stopBitCbx->setEnabled(false);
        ui.parityBitCbx->setEnabled(false);
        connect(m_pSerial, &QSerialPort::readyRead, this, &MainWin::onReadData);
        ui.serialStateBtn->setText("关闭串口");
        ui.serialStateBtn->setIcon(QIcon(":/image/openSerial.png"));
        linkState = true;
    }
    else
    {
        disconnectPort();
    }
}

// 发送数据
void MainWin::onSendData()
{
    // 无连接
    if (linkState == false)
    {
        //QMessageBox::critical(this, "错误提示", "串口没有打开!!!\n请打开串口", "确定");
        QMessageBox msgbox(this);
        msgbox.setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::Dialog);
        msgbox.setWindowTitle("错误");
        msgbox.setIcon(QMessageBox::Critical);
        msgbox.setText("串口没有打开!!!\n请打开串口");
        msgbox.addButton("确定", QMessageBox::AcceptRole);
        msgbox.setStyleSheet("QMessageBox {background-color: rgb(240,240,240);}QMessageBox QLabel#qt_msgbox_label{min-width: 180px;min-height: 40px;background-color:transparent;}");
        msgbox.exec();
        return;
    }
    this->sendDataProcess();
}

// 接收数据
void MainWin::onReadData()
{
    QByteArray msg = m_pSerial->readAll();
    // 记录接收数据量
    receiveByte += msg.size();
    ui.receiveByteLbl->setText("R:" + QString::number(receiveByte));
    // 停止显示
    if (ui.displayStateBtn->isChecked())
        return;

    // 将数据写入文本缓冲区 msg编码是本地编码(ANSI) 通过fromLocal8Bit()解码成Unicode(UTF-16)
    QString textMsg(QString::fromLocal8Bit(msg));
    //qDebug()<<textMsg;
    m_textData.append(textMsg);

    // 将数据写入十六进制缓冲区
    QString hexMsg;
    //QDataStream out(&msg, QIODevice::ReadWrite);
    //while (!out.atEnd())
    //{
    //    qint8 ch;
    //    out >> ch;
    //    hexMsg += QString("%1 ").arg(ch & 0xff, 2, 16, QLatin1Char('0'));
    //}
    //hexMsg = hexMsg.toUpper();// 转成大写

    hexMsg = msg.toHex(' ').toUpper();
    hexMsg.append(' ');
    m_hexData.append(hexMsg); 

    // 将光标移动到文本末尾,再插入数据
    //QTextCursor cursor = ui.receiveTextBrowser->textCursor();
    //cursor.movePosition(QTextCursor::End);
    //ui.receiveTextBrowser->setTextCursor(cursor);
    ui.receiveTxb->moveCursor(QTextCursor::End);

    // 十六进制显示
    if (ui.receiveFormatChk->isChecked())
    {
        ui.receiveTxb->insertPlainText(hexMsg);
    }
    else//文本显示
    {
        //转码并显示
        //ui->receiveTextBrowser->append(textMsg);  // 会自动加换行符
        ui.receiveTxb->insertPlainText(textMsg);
    }

    // 将光标移动到文本末尾
    ui.receiveTxb->moveCursor(QTextCursor::End);
}

// 定时发送数据
void MainWin::onTimedData(bool checked)
{
    if (checked)
    {
        int msec = ui.cycleLd->text().toInt();
        m_timedSend.start(msec);
        ui.cycleLd->setEnabled(false);
    }
    else
    {
        m_timedSend.stop();
        ui.cycleLd->setEnabled(true);
    }
}

// 接收区样式
void MainWin::onReceiveAreaStyle(bool checked)
{
    // 是否是白底黑字
    if (checked == true)
    {
        ui.receiveTxb->setStyleSheet("background-color: rgb(255, 255, 255);"
            "color: rgb(0, 0, 0);");
    }
    else
    {
        ui.receiveTxb->setStyleSheet("background-color: rgb(0, 0, 0);"
            "color: rgb(0, 255, 0);");
    }
}

// 更改接收数据格式
void MainWin::onChangeReceivedDataFormat(bool checked)
{
    // 清空使光标回到起始点
    ui.receiveTxb->clear();
    // 十六进制显示
    if (checked)
    {
        ui.receiveTxb->insertPlainText(m_hexData);
    }
    else// 文本显示
    {
        // 转码并显示
        ui.receiveTxb->insertPlainText(m_textData);
    }
}

// 清空发送数据
void MainWin::onClearSendData()
{
    sendByte = 0;
    ui.sendByteLbl->setText("S:" + QString::number(sendByte));
    ui.sendTxd->clear();
}

// 清空接收数据
void MainWin::onClearReceivedData()
{
    receiveByte = 0;
    ui.receiveByteLbl->setText("R:" + QString::number(receiveByte));
    ui.receiveTxb->clear();
    m_textData.clear();
    m_hexData.clear();
}

// 停止显示
void MainWin::onStopDisplay(bool checked)
{
    if (checked)
    {
        ui.displayStateBtn->setText("继续显示");
    }
    else
    {
        ui.displayStateBtn->setText("停止显示");
    }
}

// 定时周期格式
void MainWin::onTimeCycleTextFormat()
{
    if (ui.cycleLd->hasAcceptableInput() == false)
    {
        //QMessageBox::warning(this, "提示", "输入格式不正确!\n请输入数字(1-1000000)", "确定");
        QMessageBox msgbox(this);
        msgbox.setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::Dialog );
        msgbox.setWindowTitle("提示");
        msgbox.setIcon(QMessageBox::Warning);
        msgbox.setText("输入格式不正确!\n请输入数字(1-1000000)");
        msgbox.addButton("确定", QMessageBox::AcceptRole);
        msgbox.setStyleSheet("QMessageBox {background-color: rgb(240,240,240);}QMessageBox QLabel#qt_msgbox_label{min-width: 180px;min-height: 40px;background-color:transparent;}");
        msgbox.exec();
        ui.cycleLd->setText("1000");
    }
}

// 修改发送区数据
void MainWin::modifySendDataFormatSlot()
{
    if (ui.sendFormatChk->isChecked()) 
    {
        // 转成16进制
        QString strText = ui.sendTxd->toPlainText().replace('\n', "\r\n");
        QByteArray hex = strText.toLocal8Bit().toHex(' ').toUpper();
        ui.sendTxd->setPlainText(hex);
    }
    else
    {
        // 转成文本
        QString strHex = ui.sendTxd->toPlainText();
        strHex.remove(QRegExp("\\s"));  // 删除所有空格
        if (strHex.size() % 2 != 0)     // 奇数删掉最后一个字符
        {
            strHex = strHex.left(strHex.size() - 1);
        }
        QByteArray text = QByteArray::fromHex(strHex.toUtf8());
        ui.sendTxd->setPlainText(QString::fromLocal8Bit(text));
    }
}

void MainWin::sendDataChangeSlot()
{
    if (ui.sendFormatChk->isChecked())
    {  
        QString data = ui.sendTxd->toPlainText();
        if (data.isEmpty())
                return;

        QRegExp rx("[0-9a-fA-F ]+$");
        if (!rx.exactMatch(data))
        {
            ui.sendTxd->textCursor().deletePreviousChar();  //删除光标前的字符
            QMessageBox msgbox(this);
            msgbox.setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::Dialog);
            msgbox.setWindowTitle("提示");
            msgbox.setText("请输入正确格式0-9a-fA-F 例如 01 0a 0b");
            msgbox.addButton("确定", QMessageBox::AcceptRole);
            msgbox.setStyleSheet("QMessageBox {background-color: rgb(240,240,240);}QMessageBox QLabel#qt_msgbox_label{min-width: 310px;min-height: 40px;background-color:transparent;}");
            msgbox.exec();
        }
    }
}

// 打开计算器
void MainWin::onOpenCalculator()
{
    QProcess::startDetached("calc\n");
}

.ui文件
在这里插入图片描述

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>MainWinClass</class>
 <widget class="QMainWindow" name="MainWinClass">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>910</width>
    <height>740</height>
   </rect>
  </property>
  <property name="minimumSize">
   <size>
    <width>910</width>
    <height>740</height>
   </size>
  </property>
  <property name="windowTitle">
   <string>MainWin</string>
  </property>
  <property name="styleSheet">
   <string notr="true">QWidget{
	color:  #000000;
	font:  16px &quot;SimHei&quot;;
}
QComboBox{
	 padding-left: 8px;
}
 QAbstractItemView {
    outline: 0;
    font: 16px &quot;SimHei&quot;;
	min-height:36px;
}
QAbstractItemView::item {
	color: rgb(0, 0, 0);
	background-color: rgb(255, 255, 255);
    padding-left: 5px;
 	min-height:  28px;
    min-width:  60px;
}
QAbstractItemView::item:selected {
	background-color: rgb(204, 228, 247);
}

QScrollArea{
   	border-radius: 2px;
	border: 2px solid rgb(0, 0, 0);
}

QScrollBar:vertical{
    border: none;
    width: 20px;
    margin: 16px 0 16px 0;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
    background: #f0f0f0;
}
QScrollBar::handle:vertical {
    /*background: transparent;*/
	background: #cccccc;
    min-height: 60px;
    border: none;
}
QScrollBar:handle:vertical:hover {
	background: #a6a6a6;
}

QScrollBar::add-line:vertical {
    border: 0px solid grey;
    background: #f0f0f0;
    height: 16px;
    subcontrol-position: bottom;
    subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical {
    border: 0px solid grey;
    background: #f0f0f0;
    height: 16px;
    subcontrol-position: top;
    subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical:hover,QScrollBar::add-line:vertical:hover
{
	background: #dadada;
}
QScrollBar::up-arrow:vertical { 
	border-image: url(:/image/scrollbarUp_default.png);
}
QScrollBar::down-arrow:vertical {
	border-image: url(:/image/scrollbarDown_default.png);	
}
QScrollBar::up-arrow:vertical:pressed { 
	border-image: url(:/image/scrollbarUp_clicked.png);
	background: #646464;
}
QScrollBar::down-arrow:vertical:pressed  {
	border-image: url(:/image/scrollbarDown_clicked.png);
	background: #646464;	
}
</string>
  </property>
  <widget class="QWidget" name="centralWidget">
   <layout class="QVBoxLayout" name="verticalLayout_3">
    <property name="spacing">
     <number>6</number>
    </property>
    <property name="leftMargin">
     <number>8</number>
    </property>
    <property name="topMargin">
     <number>2</number>
    </property>
    <property name="rightMargin">
     <number>8</number>
    </property>
    <property name="bottomMargin">
     <number>2</number>
    </property>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout_2">
      <item>
       <widget class="QTextBrowser" name="receiveTxb">
        <property name="font">
         <font>
          <family>SimHei</family>
          <pointsize>-1</pointsize>
          <weight>50</weight>
          <italic>false</italic>
          <bold>false</bold>
         </font>
        </property>
        <property name="focusPolicy">
         <enum>Qt::NoFocus</enum>
        </property>
        <property name="verticalScrollBarPolicy">
         <enum>Qt::ScrollBarAlwaysOn</enum>
        </property>
       </widget>
      </item>
      <item>
       <widget class="QGroupBox" name="groupBox_7">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
          <width>245</width>
          <height>0</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
          <width>240</width>
          <height>16777215</height>
         </size>
        </property>
        <property name="font">
         <font>
          <family>SimHei</family>
          <pointsize>-1</pointsize>
          <weight>50</weight>
          <italic>false</italic>
          <bold>false</bold>
         </font>
        </property>
        <property name="styleSheet">
         <string notr="true">QGroupBox{
	font-size: 20px;
}</string>
        </property>
        <property name="title">
         <string>串口配置</string>
        </property>
        <property name="flat">
         <bool>false</bool>
        </property>
        <property name="checkable">
         <bool>false</bool>
        </property>
        <layout class="QVBoxLayout" name="verticalLayout">
         <property name="leftMargin">
          <number>8</number>
         </property>
         <property name="topMargin">
          <number>2</number>
         </property>
         <property name="rightMargin">
          <number>2</number>
         </property>
         <property name="bottomMargin">
          <number>0</number>
         </property>
         <item>
          <layout class="QGridLayout" name="gridLayout">
           <item row="0" column="1">
            <widget class="QComboBox" name="portNumCbx">
             <property name="minimumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
            </widget>
           </item>
           <item row="2" column="1">
            <widget class="QComboBox" name="dataBitCbx">
             <property name="minimumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <item>
              <property name="text">
               <string>8</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>7</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>6</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>5</string>
              </property>
             </item>
            </widget>
           </item>
           <item row="4" column="1">
            <widget class="QComboBox" name="parityBitCbx">
             <property name="minimumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <item>
              <property name="text">
               <string></string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>奇校验</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>偶校验</string>
              </property>
             </item>
            </widget>
           </item>
           <item row="2" column="0">
            <widget class="QLabel" name="label_9">
             <property name="sizePolicy">
              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>数据位:</string>
             </property>
            </widget>
           </item>
           <item row="3" column="1">
            <widget class="QComboBox" name="stopBitCbx">
             <property name="minimumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <item>
              <property name="text">
               <string>1</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>1.5</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>2</string>
              </property>
             </item>
            </widget>
           </item>
           <item row="1" column="0">
            <widget class="QLabel" name="label_8">
             <property name="sizePolicy">
              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>波特率:</string>
             </property>
            </widget>
           </item>
           <item row="3" column="0">
            <widget class="QLabel" name="label_10">
             <property name="sizePolicy">
              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>停止位:</string>
             </property>
            </widget>
           </item>
           <item row="4" column="0">
            <widget class="QLabel" name="label_11">
             <property name="sizePolicy">
              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>校验位:</string>
             </property>
            </widget>
           </item>
           <item row="0" column="0">
            <widget class="QLabel" name="label_7">
             <property name="sizePolicy">
              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>端口号:</string>
             </property>
            </widget>
           </item>
           <item row="1" column="1">
            <widget class="QComboBox" name="baudCbx">
             <property name="minimumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="currentIndex">
              <number>0</number>
             </property>
             <item>
              <property name="text">
               <string>115200</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>76800</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>38400</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>9600</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>4800</string>
              </property>
             </item>
            </widget>
           </item>
           <item row="5" column="0">
            <widget class="QLabel" name="label_12">
             <property name="sizePolicy">
              <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>串口操作:</string>
             </property>
            </widget>
           </item>
           <item row="5" column="1">
            <widget class="QPushButton" name="serialStateBtn">
             <property name="minimumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>打开串口</string>
             </property>
             <property name="icon">
              <iconset resource="MainWin.qrc">
               <normaloff>:/image/closeSerial.png</normaloff>:/image/closeSerial.png</iconset>
             </property>
             <property name="iconSize">
              <size>
               <width>30</width>
               <height>30</height>
              </size>
             </property>
            </widget>
           </item>
          </layout>
         </item>
         <item>
          <layout class="QHBoxLayout" name="horizontalLayout_5">
           <item>
            <widget class="QPushButton" name="displayStateBtn">
             <property name="minimumSize">
              <size>
               <width>0</width>
               <height>36</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>停止显示</string>
             </property>
             <property name="checkable">
              <bool>true</bool>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QPushButton" name="clearReceiveBtn">
             <property name="sizePolicy">
              <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
             <property name="minimumSize">
              <size>
               <width>120</width>
               <height>36</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>清空接收区</string>
             </property>
            </widget>
           </item>
          </layout>
         </item>
         <item>
          <layout class="QGridLayout" name="gridLayout_2">
           <property name="spacing">
            <number>6</number>
           </property>
           <item row="0" column="0">
            <widget class="QCheckBox" name="receiveFormatChk">
             <property name="minimumSize">
              <size>
               <width>110</width>
               <height>28</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>110</width>
               <height>28</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>16进制显示</string>
             </property>
            </widget>
           </item>
           <item row="0" column="1">
            <widget class="QCheckBox" name="receiveStyleChk">
             <property name="minimumSize">
              <size>
               <width>100</width>
               <height>28</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>100</width>
               <height>28</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>白底黑字</string>
             </property>
             <property name="checked">
              <bool>false</bool>
             </property>
             <property name="tristate">
              <bool>false</bool>
             </property>
            </widget>
           </item>
           <item row="0" column="2">
            <spacer name="horizontalSpacer_4">
             <property name="orientation">
              <enum>Qt::Horizontal</enum>
             </property>
             <property name="sizeHint" stdset="0">
              <size>
               <width>40</width>
               <height>20</height>
              </size>
             </property>
            </spacer>
           </item>
          </layout>
         </item>
         <item>
          <widget class="Line" name="line">
           <property name="frameShadow">
            <enum>QFrame::Sunken</enum>
           </property>
           <property name="lineWidth">
            <number>2</number>
           </property>
           <property name="orientation">
            <enum>Qt::Horizontal</enum>
           </property>
          </widget>
         </item>
         <item>
          <layout class="QGridLayout" name="gridLayout_3">
           <property name="spacing">
            <number>6</number>
           </property>
           <item row="0" column="1">
            <widget class="QCheckBox" name="timerChk">
             <property name="minimumSize">
              <size>
               <width>100</width>
               <height>28</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>100</width>
               <height>28</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>定时发送</string>
             </property>
            </widget>
           </item>
           <item row="0" column="2">
            <layout class="QHBoxLayout" name="horizontalLayout_4">
             <property name="spacing">
              <number>2</number>
             </property>
             <item>
              <widget class="QLabel" name="label">
               <property name="sizePolicy">
                <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
                 <horstretch>0</horstretch>
                 <verstretch>0</verstretch>
                </sizepolicy>
               </property>
               <property name="minimumSize">
                <size>
                 <width>45</width>
                 <height>0</height>
                </size>
               </property>
               <property name="maximumSize">
                <size>
                 <width>45</width>
                 <height>16777215</height>
                </size>
               </property>
               <property name="font">
                <font>
                 <family>SimHei</family>
                 <pointsize>-1</pointsize>
                 <weight>50</weight>
                 <italic>false</italic>
                 <bold>false</bold>
                </font>
               </property>
               <property name="text">
                <string>周期:</string>
               </property>
              </widget>
             </item>
             <item>
              <widget class="QLineEdit" name="cycleLd">
               <property name="minimumSize">
                <size>
                 <width>50</width>
                 <height>24</height>
                </size>
               </property>
               <property name="maximumSize">
                <size>
                 <width>40</width>
                 <height>24</height>
                </size>
               </property>
               <property name="font">
                <font>
                 <family>SimHei</family>
                 <pointsize>-1</pointsize>
                 <weight>50</weight>
                 <italic>false</italic>
                 <bold>false</bold>
                </font>
               </property>
               <property name="inputMask">
                <string/>
               </property>
               <property name="text">
                <string>1000</string>
               </property>
               <property name="maxLength">
                <number>10</number>
               </property>
              </widget>
             </item>
             <item>
              <widget class="QLabel" name="label_2">
               <property name="minimumSize">
                <size>
                 <width>20</width>
                 <height>0</height>
                </size>
               </property>
               <property name="maximumSize">
                <size>
                 <width>20</width>
                 <height>16777215</height>
                </size>
               </property>
               <property name="font">
                <font>
                 <family>SimHei</family>
                 <pointsize>-1</pointsize>
                 <weight>50</weight>
                 <italic>false</italic>
                 <bold>false</bold>
                </font>
               </property>
               <property name="text">
                <string>ms</string>
               </property>
               <property name="alignment">
                <set>Qt::AlignCenter</set>
               </property>
              </widget>
             </item>
            </layout>
           </item>
           <item row="2" column="2">
            <widget class="QCheckBox" name="newLineChk">
             <property name="minimumSize">
              <size>
               <width>110</width>
               <height>28</height>
              </size>
             </property>
             <property name="maximumSize">
              <size>
               <width>110</width>
               <height>28</height>
              </size>
             </property>
             <property name="font">
              <font>
               <family>SimHei</family>
               <pointsize>-1</pointsize>
               <weight>50</weight>
               <italic>false</italic>
               <bold>false</bold>
              </font>
             </property>
             <property name="text">
              <string>自动换行</string>
             </property>
             <property name="checked">
              <bool>true</bool>
             </property>
            </widget>
           </item>
           <item row="2" column="1">
            <widget class="QCheckBox" name="sendFormatChk">
             <property name="minimumSize">
              <size>
               <width>110</width>
               <height>28</height>
              </size>
             </property>
             <property name="text">
              <string>16进制发送</string>
             </property>
            </widget>
           </item>
          </layout>
         </item>
         <item>
          <spacer name="verticalSpacer_2">
           <property name="orientation">
            <enum>Qt::Vertical</enum>
           </property>
           <property name="sizeHint" stdset="0">
            <size>
             <width>20</width>
             <height>40</height>
            </size>
           </property>
          </spacer>
         </item>
        </layout>
       </widget>
      </item>
     </layout>
    </item>
    <item>
     <widget class="QWidget" name="widget_8" native="true">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
      <property name="minimumSize">
       <size>
        <width>0</width>
        <height>120</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
        <width>16777215</width>
        <height>120</height>
       </size>
      </property>
      <layout class="QHBoxLayout" name="horizontalLayout">
       <property name="leftMargin">
        <number>0</number>
       </property>
       <property name="topMargin">
        <number>0</number>
       </property>
       <property name="rightMargin">
        <number>0</number>
       </property>
       <property name="bottomMargin">
        <number>0</number>
       </property>
       <item>
        <widget class="QTextEdit" name="sendTxd">
         <property name="verticalScrollBarPolicy">
          <enum>Qt::ScrollBarAlwaysOn</enum>
         </property>
        </widget>
       </item>
       <item>
        <layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,1,2">
         <item>
          <widget class="QPushButton" name="sendBtn">
           <property name="sizePolicy">
            <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
           <property name="maximumSize">
            <size>
             <width>16777215</width>
             <height>36</height>
            </size>
           </property>
           <property name="font">
            <font>
             <family>SimHei</family>
             <pointsize>-1</pointsize>
             <weight>50</weight>
             <italic>false</italic>
             <bold>false</bold>
            </font>
           </property>
           <property name="text">
            <string>发送</string>
           </property>
          </widget>
         </item>
         <item>
          <spacer name="verticalSpacer">
           <property name="orientation">
            <enum>Qt::Vertical</enum>
           </property>
           <property name="sizeHint" stdset="0">
            <size>
             <width>20</width>
             <height>40</height>
            </size>
           </property>
          </spacer>
         </item>
         <item>
          <widget class="QPushButton" name="clearSendBtn">
           <property name="sizePolicy">
            <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
           <property name="minimumSize">
            <size>
             <width>107</width>
             <height>0</height>
            </size>
           </property>
           <property name="maximumSize">
            <size>
             <width>16777215</width>
             <height>36</height>
            </size>
           </property>
           <property name="font">
            <font>
             <family>SimHei</family>
             <pointsize>-1</pointsize>
             <weight>50</weight>
             <italic>false</italic>
             <bold>false</bold>
            </font>
           </property>
           <property name="text">
            <string>清空发送区</string>
           </property>
          </widget>
         </item>
        </layout>
       </item>
      </layout>
     </widget>
    </item>
    <item>
     <widget class="QWidget" name="widget" native="true">
      <property name="font">
       <font>
        <family>SimHei</family>
        <pointsize>-1</pointsize>
        <weight>50</weight>
        <italic>false</italic>
        <bold>false</bold>
       </font>
      </property>
      <layout class="QHBoxLayout" name="horizontalLayout_3">
       <property name="leftMargin">
        <number>0</number>
       </property>
       <property name="topMargin">
        <number>0</number>
       </property>
       <property name="rightMargin">
        <number>0</number>
       </property>
       <property name="bottomMargin">
        <number>0</number>
       </property>
       <item>
        <widget class="QPushButton" name="calculatorBtn">
         <property name="minimumSize">
          <size>
           <width>28</width>
           <height>28</height>
          </size>
         </property>
         <property name="maximumSize">
          <size>
           <width>28</width>
           <height>28</height>
          </size>
         </property>
         <property name="toolTip">
          <string>计算器</string>
         </property>
         <property name="statusTip">
          <string/>
         </property>
         <property name="whatsThis">
          <string/>
         </property>
         <property name="styleSheet">
          <string notr="true">QPushButton{
	border-image: url(:/image/calculator.png);
}
QPushButton:pressed{
	border: 1px solid reg(0,0,0);
}</string>
         </property>
         <property name="text">
          <string/>
         </property>
        </widget>
       </item>
       <item>
        <spacer name="horizontalSpacer_3">
         <property name="orientation">
          <enum>Qt::Horizontal</enum>
         </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>40</width>
           <height>20</height>
          </size>
         </property>
        </spacer>
       </item>
       <item>
        <widget class="QLabel" name="sendByteLbl">
         <property name="minimumSize">
          <size>
           <width>200</width>
           <height>0</height>
          </size>
         </property>
         <property name="maximumSize">
          <size>
           <width>200</width>
           <height>16777215</height>
          </size>
         </property>
         <property name="font">
          <font>
           <family>SimHei</family>
           <pointsize>-1</pointsize>
           <weight>50</weight>
           <italic>false</italic>
           <bold>false</bold>
          </font>
         </property>
         <property name="text">
          <string>S:0</string>
         </property>
        </widget>
       </item>
       <item>
        <spacer name="horizontalSpacer">
         <property name="orientation">
          <enum>Qt::Horizontal</enum>
         </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>40</width>
           <height>20</height>
          </size>
         </property>
        </spacer>
       </item>
       <item>
        <widget class="QLabel" name="receiveByteLbl">
         <property name="minimumSize">
          <size>
           <width>200</width>
           <height>0</height>
          </size>
         </property>
         <property name="maximumSize">
          <size>
           <width>200</width>
           <height>16777215</height>
          </size>
         </property>
         <property name="font">
          <font>
           <family>SimHei</family>
           <pointsize>-1</pointsize>
           <weight>50</weight>
           <italic>false</italic>
           <bold>false</bold>
          </font>
         </property>
         <property name="text">
          <string>R:0</string>
         </property>
        </widget>
       </item>
       <item>
        <spacer name="horizontalSpacer_2">
         <property name="orientation">
          <enum>Qt::Horizontal</enum>
         </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>40</width>
           <height>20</height>
          </size>
         </property>
        </spacer>
       </item>
       <item>
        <widget class="QLabel" name="localTimeLbl">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
         <property name="minimumSize">
          <size>
           <width>160</width>
           <height>0</height>
          </size>
         </property>
         <property name="maximumSize">
          <size>
           <width>160</width>
           <height>16777215</height>
          </size>
         </property>
         <property name="font">
          <font>
           <family>SimHei</family>
           <pointsize>-1</pointsize>
           <weight>50</weight>
           <italic>false</italic>
           <bold>false</bold>
          </font>
         </property>
         <property name="text">
          <string>当前时间:00:00:00</string>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
    </item>
   </layout>
  </widget>
 </widget>
 <layoutdefault spacing="6" margin="11"/>
 <resources>
  <include location="MainWin.qrc"/>
 </resources>
 <connections/>
</ui>

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
Qt是一种跨平台的应用程序框架,可以用于开发各种类型的应用程序,包括串口助手Qt 5.12是Qt框架的一个版本,具有许多新的功能和改进。下面将使用中文回答关于Qt 5.12串口助手的问题。 Qt 5.12中的串口助手是一个用于与串口通信的工具。它允许用户通过串口与其他设备进行数据交换。使用串口助手,用户可以发送和接收数据,并监视串口的状态。 Qt 5.12的串口助手具有用户友好的界面和丰富的功能。用户可以选择串口号、波特率、数据位、停止位和校验位等参数,并且可以自定义这些参数以满足特定的需求。用户可以通过打开和关闭串口连接来开始和结束通信。 在串口助手中,用户可以输入要发送的数据,并通过点击发送按钮将其发送到串口。用户还可以接收从串口接收到的数据,并在界面上显示。这样,用户可以通过串口助手实时地查看和分析串口通信数据。 此外,Qt 5.12的串口助手还提供了诸如自动发送、数据保存、接收数据打印和数据清除等功能。用户可以设置自动发送功能,使串口助手自动按照特定的时间间隔发送数据。用户还可以将接收到的数据保存到本地文件中,以便后续分析和使用。 总的来说,Qt 5.12的串口助手是一个功能强大而易于使用的工具,可以帮助用户与串口通信并监视数据的发送和接收。无论是用于嵌入式系统的开发还是进行串口调试,Qt 5.12的串口助手都能提供方便快捷的解决方案。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值