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 |
Typdokumentation
enum class QBluetooth::AttAccessConstraint
flags QBluetooth::AttAccessConstraints
Diese Enumeration beschreibt die möglichen Anforderungen für das Lesen oder Schreiben eines ATT-Attributs.
| Konstante | Wert | Beschreibung |
|---|---|---|
QBluetooth::AttAccessConstraint::AttAuthorizationRequired | 0x1 | Der Client benötigt eine Autorisierung durch den ATT-Server, um auf das Attribut zugreifen zu können. |
QBluetooth::AttAccessConstraint::AttAuthenticationRequired | 0x2 | Der Client muss authentifiziert sein, um auf das Attribut zugreifen zu können. |
QBluetooth::AttAccessConstraint::AttEncryptionRequired | 0x4 | Auf 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.
| Konstante | Wert | Beschreibung |
|---|---|---|
QBluetooth::Security::NoSecurity | 0x00 | Der Dienst erfordert keine Sicherheitsmaßnahmen. |
QBluetooth::Security::Authorization | 0x01 | Der Dienst erfordert eine Autorisierung durch den Benutzer, es sei denn, das Gerät ist „Authorized-Paired“. |
QBluetooth::Security::Authentication | 0x02 | Der 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::Encryption | 0x04 | Der Dienst erfordert eine verschlüsselte Kommunikationsverbindung. Dazu muss das Gerät gekoppelt sein. |
QBluetooth::Security::Secure | 0x08 | Der 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.