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

posted @ 2025-02-07 22:17  txwtech  阅读(58)  评论(0)    收藏  举报