Auf dieser Seite

QBluetooth Namespace

Der Namespace „QBluetooth“ enthält Klassen und Funktionen rund um Bluetooth. Mehr dazu...

Header: #include <qbluetooth.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Bluetooth)
target_link_libraries(mytarget PRIVATE Qt6::Bluetooth)
qmake: QT += bluetooth

Typen

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

Ausführliche Beschreibung

Typdokumentation

enum class QBluetooth::AttAccessConstraint
flags QBluetooth::AttAccessConstraints

Diese Enumeration beschreibt die möglichen Anforderungen für das Lesen oder Schreiben eines ATT-Attributs.

KonstanteWertBeschreibung
QBluetooth::AttAccessConstraint::AttAuthorizationRequired0x1Der Client benötigt eine Autorisierung durch den ATT-Server, um auf das Attribut zugreifen zu können.
QBluetooth::AttAccessConstraint::AttAuthenticationRequired0x2Der Client muss authentifiziert sein, um auf das Attribut zugreifen zu können.
QBluetooth::AttAccessConstraint::AttEncryptionRequired0x4Auf das Attribut kann nur zugegriffen werden, wenn die Verbindung verschlüsselt ist.

Der Typ „AttAccessConstraints“ ist ein `typedef` für `QFlags<AttAccessConstraint>`. Er speichert eine ODER-Kombination von `AttAccessConstraint`-Werten.

QLowEnergyHandle

Typedef für Bluetooth Low Energy-ATT-Attribut-Handles.

enum class QBluetooth::Security
flags QBluetooth::SecurityFlags

Diese Enumeration beschreibt die Sicherheitsanforderungen eines Bluetooth-Dienstes.

KonstanteWertBeschreibung
QBluetooth::Security::NoSecurity0x00Der Dienst erfordert keine Sicherheitsmaßnahmen.
QBluetooth::Security::Authorization0x01Der Dienst erfordert eine Autorisierung durch den Benutzer, es sei denn, das Gerät ist „Authorized-Paired“.
QBluetooth::Security::Authentication0x02Der Dienst erfordert eine Authentifizierung. Das Gerät muss gekoppelt sein, und der Benutzer wird bei der Verbindung zur Eingabe aufgefordert, es sei denn, das Gerät ist „Authorized-Paired“.
QBluetooth::Security::Encryption0x04Der Dienst erfordert eine verschlüsselte Kommunikationsverbindung. Dazu muss das Gerät gekoppelt sein.
QBluetooth::Security::Secure0x08Der Dienst erfordert, dass die Kommunikationsverbindung sicher ist. „Simple Pairing“ ab Bluetooth 2.1 oder höher ist erforderlich. „Legacy Pairing“ ist nicht zulässig.

Der Typ „SecurityFlags“ ist ein „typedef“ für „QFlags<Security>“. Er speichert eine ODER-Kombination von „Security“-Werten.

© 2026 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.