QBluetoothAddress Class
La classe QBluetoothAddress attribue une adresse au périphérique Bluetooth. En savoir plus...
| En-tête : | #include <QBluetoothAddress> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS Bluetooth) target_link_libraries(mytarget PRIVATE Qt6::Bluetooth) |
| qmake : | QT += bluetooth |
Fonctions publiques
| QBluetoothAddress() | |
| QBluetoothAddress(const QString &address) | |
| QBluetoothAddress(quint64 address) | |
| QBluetoothAddress(QBluetoothAddress &&) | |
| void | clear() |
| bool | isNull() const |
| QString | toString() const |
| quint64 | toUInt64() const |
| QBluetoothAddress & | operator=(QBluetoothAddress &&) |
Éléments non membres associés
(since 6.6) size_t | qHash(const QBluetoothAddress &key, size_t seed = 0) |
| bool | operator!=(const QBluetoothAddress &a, const QBluetoothAddress &b) |
| bool | operator<(const QBluetoothAddress &a, const QBluetoothAddress &b) |
| bool | operator==(const QBluetoothAddress &a, const QBluetoothAddress &b) |
Description détaillée
Cette classe contient une adresse Bluetooth indépendamment de la plate-forme et du protocole.
Documentation des fonctions membres
[constexpr noexcept] QBluetoothAddress::QBluetoothAddress()
Crée une adresse Bluetooth nulle.
[explicit] QBluetoothAddress::QBluetoothAddress(const QString &address)
Crée une nouvelle adresse Bluetooth et lui attribue l'address.
Le format de l'address peut être soit XX:XX:XX:XX:XX:XX, soit XXXXXXXXXXXX, où X est un chiffre hexadécimal. La casse n'a pas d'importance.
[explicit constexpr noexcept] QBluetoothAddress::QBluetoothAddress(quint64 address)
Crée une nouvelle adresse Bluetooth et lui attribue l'address.
[constexpr noexcept default] QBluetoothAddress::QBluetoothAddress(QBluetoothAddress &&)
Crée par « move » une instance de ` QBluetoothAddress`.
[noexcept] void QBluetoothAddress::clear()
Définit l'adresse Bluetooth sur 00:00:00:00:00:00.
[noexcept] bool QBluetoothAddress::isNull() const
Renvoie « true » si l'adresse Bluetooth est nulle, sinon renvoie « false ».
QString QBluetoothAddress::toString() const
Renvoie l'adresse Bluetooth sous la forme d'une chaîne de caractères au format XX:XX:XX:XX:XX:XX.
[noexcept] quint64 QBluetoothAddress::toUInt64() const
Renvoie cette adresse Bluetooth sous la forme d'un nombre de type « quint64 ».
[noexcept default] QBluetoothAddress &QBluetoothAddress::operator=(QBluetoothAddress &&)
Cette opération affecte l'other à cette instance QBluetoothAddress.
Éléments non membres associés
[noexcept, since 6.6] size_t qHash(const QBluetoothAddress &key, size_t seed = 0)
Renvoie la valeur de hachage correspondant à l'key, en utilisant seed comme graine pour le calcul.
Cette fonction a été introduite dans Qt 6.6.
bool operator!=(const QBluetoothAddress &a, const QBluetoothAddress &b)
Renvoie « true » si les deux adresses Bluetooth a et b ne sont pas identiques ; sinon, renvoie « false ».
bool operator<(const QBluetoothAddress &a, const QBluetoothAddress &b)
Renvoie « true » si l'adresse Bluetooth a est inférieure à b; sinon, renvoie « false ».
bool operator==(const QBluetoothAddress &a, const QBluetoothAddress &b)
Renvoie « true » si les deux adresses Bluetooth a et b sont identiques ; sinon, renvoie « false ».
© 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.