QBluetooth Namespace
L'espace de noms QBluetooth fournit des classes et des fonctions liées à Bluetooth. En savoir plus...
| En-tête : | #include <qbluetooth.h> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS Bluetooth) target_link_libraries(mytarget PRIVATE Qt6::Bluetooth) |
| qmake : | QT += bluetooth |
Types
| enum class | AttAccessConstraint { AttAuthorizationRequired, AttAuthenticationRequired, AttEncryptionRequired } |
| flags | AttAccessConstraints |
| QLowEnergyHandle | |
| enum class | Security { NoSecurity, Authorization, Authentication, Encryption, Secure } |
| flags | SecurityFlags |
Documentation sur les types
enum class QBluetooth::AttAccessConstraint
flags QBluetooth::AttAccessConstraints
Cette énumération décrit les conditions possibles pour la lecture ou l'écriture d'un attribut ATT.
| Constante | Valeur | Description |
|---|---|---|
QBluetooth::AttAccessConstraint::AttAuthorizationRequired | 0x1 | Le client doit obtenir l'autorisation du serveur ATT pour accéder à l'attribut. |
QBluetooth::AttAccessConstraint::AttAuthenticationRequired | 0x2 | Le client doit être authentifié pour accéder à l'attribut. |
QBluetooth::AttAccessConstraint::AttEncryptionRequired | 0x4 | L'accès à l'attribut n'est possible que si la connexion est chiffrée. |
Le type AttAccessConstraints est une définition de type (typedef) pour QFlags<AttAccessConstraint>. Il stocke une combinaison « OU » de valeurs AttAccessConstraint.
QLowEnergyHandle
Définition de type pour les identifiants d'attributs ATT Bluetooth Low Energy.
enum class QBluetooth::Security
flags QBluetooth::SecurityFlags
Cette énumération décrit les exigences de sécurité d'un service Bluetooth.
| Constante | Valeur | Description |
|---|---|---|
QBluetooth::Security::NoSecurity | 0x00 | Le service ne nécessite aucune mesure de sécurité. |
QBluetooth::Security::Authorization | 0x01 | Le service nécessite une autorisation de la part de l'utilisateur, sauf si l'appareil est « autorisé et appairé ». |
QBluetooth::Security::Authentication | 0x02 | Le service nécessite une authentification. L'appareil doit être appairé, et l'utilisateur est invité à s'identifier lors de la connexion, sauf si l'appareil est « Autorisé-Appairé ». |
QBluetooth::Security::Encryption | 0x04 | Le service nécessite que la liaison de communication soit chiffrée. Cela nécessite que l'appareil soit appairé. |
QBluetooth::Security::Secure | 0x08 | Le service nécessite que la liaison de communication soit sécurisée. L'appairage simple (Simple Pairing) de Bluetooth 2.1 ou version ultérieure est requis. L'appairage traditionnel n'est pas autorisé. |
Le type `SecurityFlags` est un `typedef` pour ` QFlags<Security>`. Il stocke une combinaison OU de valeurs de sécurité.
© 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.