写在前面 串口QSerialPort,本篇先讲讲串口的数据接收 .pro中添加QT += serialport 头文件 #include <QSerialPort> #include <QSerialPortInfo> #include <QIODevice> 定义全局变量 static QSerialPort * m_serialport=new QSerialPort(); static QByteArray uartRecvBuffer; 接收回调 绑定信号槽&#x