命令行寫入器同步範例

展示如何通過串口同步發送數據。

命令行寫入器同步 展示如何使用 QSerialPort class for sending data synchronously over the selected serial port with the desired settings.

This command line writer sync example sends data synchronously over the selected serial port in a console, provided by the QSerialPort 類。

For sending data synchronously over the selected serial port, use the write() and waitForBytesWritten() 方法。

運行範例

要運行範例從 Qt Creator ,打開 歡迎 模式,然後選擇範例從 範例 。更多信息,拜訪 構建和運行範例 .

範例工程 @ code.qt.io