允许访问串端的 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