QBluetooth Namespace | Qt Bluetooth | Qt 6.11.0
Description: The QBluetooth namespace provides classes and functions related to Bluetooth.

- Qt 6.11
- Qt Bluetooth
- QBluetooth Namespace
- Qt 6.11.0 Reference Documentation

# QBluetooth Namespace

The QBluetooth namespace provides classes and functions related to Bluetooth. More...

Header: | `#include <QBluetooth>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Bluetooth)` `target_link_libraries(mytarget PRIVATE Qt6::Bluetooth)`
qmake: | `QT += bluetooth`

## Types

| QLowEnergyHandle
enum class | Security { NoSecurity, Authorization, Authentication, Encryption, Secure }

## Detailed Description

## Type Documentation

### QLowEnergyHandle

Typedef for Bluetooth Low Energy ATT attribute handles.

### enum class QBluetooth::Security

This enum describe the security requirements of a Bluetooth service.

Constant | Value | Description
--- | --- | ---
`QBluetooth::Security::NoSecurity` | `0x00` | The service does not require any security.
`QBluetooth::Security::Authorization` | `0x01` | The service requires authorization by the user, unless the device is Authorized-Paired.
`QBluetooth::Security::Authentication` | `0x02` | The service requires authentication. Device must be paired, and the user is prompted on connection unless the device is Authorized-Paired.
`QBluetooth::Security::Encryption` | `0x04` | The service requires the communication link to be encrypted. This requires the device to be paired.
`QBluetooth::Security::Secure` | `0x08` | The service requires the communication link to be secure. Simple Pairing from Bluetooth 2.1 or greater is required. Legacy pairing is not permitted.