Qt Serial Port C++ 類

允許訪問串端的 C++ 類列錶。 更多...

QSerialPort 提供訪問串口的函數
QSerialPortInfo 提供現有串口的有關信息

詳細描述

要使用 QSerialPort 在應用程序,添加以下 include 語句:

#include <QSerialPort>
					

For QSerialPortInfo ,使用以下 include 語句:

#include <QSerialPortInfo>
					

To use the module with cmake, use the find_package() 命令定位所需模塊組件在 Qt6 包:

find_package(Qt6 REQUIRED COMPONENTS SerialPort)
target_link_libraries(mytarget PRIVATE Qt6::SerialPort)
					

To use the module for building with qmake, add the module as a value of the QT variable in the project's .pro file:

QT += serialport