QT串口扫描
串口扫描
通过遍历QSerialPortInfo::availablePorts()即可获得当前设备的所有串口号
void Scan_SerialPort(void)
{
foreach (const QSerialPortInfo &info,QSerialPortInfo::availablePorts())
{
SerialPort_List.append(info.portName());
}
}
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_53403301/article/details/141365298
欢迎讨论,相互学习。
cdtxw@foxmail.com

浙公网安备 33010602011771号