QBluetooth Namespace

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

Header: #include <QBluetooth>
qmake: QT += bluetooth
Since: Qt 5.2


enum AttAccessConstraint { AttAuthorizationRequired, AttAuthenticationRequired, AttEncryptionRequired }
flags AttAccessConstraints
typedef QLowEnergyHandle
enum Security { NoSecurity, Authorization, Authentication, Encryption, Secure }
flags SecurityFlags


QFlags<SecurityFlags::enum_type> operator|(SecurityFlags::enum_type f1, SecurityFlags::enum_type f2)
QFlags<SecurityFlags::enum_type> operator|(SecurityFlags::enum_type f1, QFlags<SecurityFlags::enum_type> f2)
QIncompatibleFlag operator|(SecurityFlags::enum_type f1, int f2)
QFlags<AttAccessConstraints::enum_type> operator|(AttAccessConstraints::enum_type f1, AttAccessConstraints::enum_type f2)
QFlags<AttAccessConstraints::enum_type> operator|(AttAccessConstraints::enum_type f1, QFlags<AttAccessConstraints::enum_type> f2)
QIncompatibleFlag operator|(AttAccessConstraints::enum_type f1, int f2)
int operator|(int, int)

Detailed Description

The QBluetooth namespace provides classes and functions related to Bluetooth.

Type Documentation

enum QBluetooth::AttAccessConstraint
flags QBluetooth::AttAccessConstraints

This enum describes the possible requirements for reading or writing an ATT attribute.

QBluetooth::AttAuthorizationRequired0x1The client needs authorization from the ATT server to access the attribute.
QBluetooth::AttAuthenticationRequired0x2The client needs to be authenticated to access the attribute.
QBluetooth::AttEncryptionRequired0x4The attribute can only be accessed if the connection is encrypted.

This enum was introduced or modified in Qt 5.7.

The AttAccessConstraints type is a typedef for QFlags<AttAccessConstraint>. It stores an OR combination of AttAccessConstraint values.

typedef QLowEnergyHandle

Typedef for Bluetooth Low Energy ATT attribute handles.

This typedef was introduced in Qt 5.4.

enum QBluetooth::Security
flags QBluetooth::SecurityFlags

This enum describe the security requirements of a Bluetooth service.

QBluetooth::NoSecurity0x00The service does not require any security.
QBluetooth::Authorization0x01The service requires authorization by the user, unless the device is Authorized-Paired.
QBluetooth::Authentication0x02The service requires authentication. Device must be paired, and the user is prompted on connection unless the device is Authorized-Paired.
QBluetooth::Encryption0x04The service requires the communication link to be encrypted. This requires the device to be paired.
QBluetooth::Secure0x08The service requires the communication link to be secure. Simple Pairing from Bluetooth 2.1 or greater is required. Legacy pairing is not permitted.

The SecurityFlags type is a typedef for QFlags<Security>. It stores an OR combination of Security values.

Function Documentation

QFlags<SecurityFlags::enum_type> QBluetooth::operator|(SecurityFlags::enum_type f1, SecurityFlags::enum_type f2)

QFlags<SecurityFlags::enum_type> QBluetooth::operator|(SecurityFlags::enum_type f1, QFlags<SecurityFlags::enum_type> f2)

QIncompatibleFlag QBluetooth::operator|(SecurityFlags::enum_type f1, int f2)

QFlags<AttAccessConstraints::enum_type> QBluetooth::operator|(AttAccessConstraints::enum_type f1, AttAccessConstraints::enum_type f2)

QFlags<AttAccessConstraints::enum_type> QBluetooth::operator|(AttAccessConstraints::enum_type f1, QFlags<AttAccessConstraints::enum_type> f2)

QIncompatibleFlag QBluetooth::operator|(AttAccessConstraints::enum_type f1, int f2)

int QBluetooth::operator|(int, int)

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.