Qt Serial Port 实例

Qt Serial Port模块提供了以下示例供参考,以帮助理解 API 的用法。

运行示例

要运行来自 Qt Creator,打开Welcome 模式,然后从Examples 中选择示例。更多信息,请参阅Qt Creator: 教程:构建并运行

Blocking Receiver

演示如何在非 GUI 线程中使用 QSerialPort 的同步 API。

Blocking Sender

演示如何在工作线程中使用 QSerialPort 的同步 API。

Serial Terminal

展示如何使用 QSerialPort 的各种功能。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.