Qt 串口範例

The Qt Serial Port 模塊提供下列參考範例,以幫助理解 API 用法。

運行範例

To run the examples from Qt Creator, open the 歡迎 模式,然後選擇範例從 範例 。更多信息,拜訪 構建和運行範例 .

Blocking Receiver

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

Blocking Sender

展示如何在工作者綫程中使用 QSerialPort 的同步 API。

Serial Terminal

展示如何使用各種 QSerialPort 特徵。