Qt Bluetooth C++ 类

启用基本蓝牙操作,像扫描设备并连接它们。 更多...

该模块在 Qt 5.2 引入。

名称空间

QBluetooth 蓝牙相关的类和函数

QBluetoothAddress Assigns an address to the Bluetooth device
QBluetoothDeviceDiscoveryAgent Discovers the Bluetooth devices nearby
QBluetoothDeviceInfo Stores information about the Bluetooth device
QBluetoothHostInfo Encapsulates the details of a local QBluetooth device
QBluetoothLocalDevice Enables access to the local Bluetooth device
QBluetoothServer Uses the RFCOMM or L2cap protocol to communicate with a Bluetooth device
QBluetoothServiceDiscoveryAgent Enables you to query for Bluetooth services
QBluetoothServiceInfo Enables access to the attributes of a Bluetooth service
QBluetoothServiceInfo::Alternative Stores attributes of a Bluetooth Data Element Alternative
QBluetoothServiceInfo::Sequence Stores attributes of a Bluetooth Data Element Sequence
QBluetoothSocket Enables connection to a Bluetooth device running a bluetooth server
QBluetoothTransferManager Transfers data to another device using Object Push Profile (OPP)
QBluetoothTransferReply Stores the response for a data transfer request
QBluetoothTransferRequest Stores information about a data transfer request
QBluetoothUuid Generates a UUID for each Bluetooth service
QLowEnergyAdvertisingData 表示蓝牙低功耗广告期间要广播的数据
QLowEnergyAdvertisingParameters 表示用于蓝牙低功耗广告的参数
QLowEnergyAdvertisingParameters::AddressInfo QLowEnergyAdvertisingParameters::AddressInfo defines the elements of a white list
QLowEnergyCharacteristic Stores information about a Bluetooth Low Energy service characteristic
QLowEnergyCharacteristicData 用于设置 GATT 服务数据
QLowEnergyConnectionParameters 当请求或报告蓝牙 LE 连接的参数更新时使用
QLowEnergyController Access to Bluetooth Low Energy Devices
QLowEnergyDescriptor Stores information about the Bluetooth Low Energy descriptor
QLowEnergyDescriptorData 用于创建 GATT 服务数据
QLowEnergyService Represents an individual service on a Bluetooth Low Energy Device
QLowEnergyServiceData 用于设置 GATT 服务数据

详细描述

Qt Bluetooth C++ API 使应用程序能够扫描设备并以更灵活方式连接设备并与之交互相比 Qt Bluetooth QML 类型 .

要使用 C++ 库在应用程序,添加以下配置选项到 .pro 文件:

QT += bluetooth