QBluetoothAddress Class
La clase QBluetoothAddress asigna una dirección al dispositivo Bluetooth. Más información...
| Encabezado: | #include <QBluetoothAddress> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Bluetooth) target_link_libraries(mytarget PRIVATE Qt6::Bluetooth) |
| qmake: | QT += bluetooth |
Funciones públicas
| QBluetoothAddress() | |
| QBluetoothAddress(const QString &address) | |
| QBluetoothAddress(quint64 address) | |
| QBluetoothAddress(QBluetoothAddress &&) | |
| void | clear() |
| bool | isNull() const |
| QString | toString() const |
| quint64 | toUInt64() const |
| QBluetoothAddress & | operator=(QBluetoothAddress &&) |
Elementos no miembros relacionados
(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) |
Descripción detallada
Esta clase almacena una dirección Bluetooth de forma independiente de la plataforma y del protocolo.
Documentación de las funciones de miembro
[constexpr noexcept] QBluetoothAddress::QBluetoothAddress()
Crea una dirección Bluetooth nula.
[explicit] QBluetoothAddress::QBluetoothAddress(const QString &address)
Crea una nueva dirección Bluetooth y le asigna el valor « address ».
El formato de address puede ser XX:XX:XX:XX:XX:XX o XXXXXXXXXXXX, donde X es un dígito hexadecimal. No se distingue entre mayúsculas y minúsculas.
[explicit constexpr noexcept] QBluetoothAddress::QBluetoothAddress(quint64 address)
Crea una nueva dirección Bluetooth y le asigna el nombre « address ».
[constexpr noexcept default] QBluetoothAddress::QBluetoothAddress(QBluetoothAddress &&)
Crea una instancia de ` QBluetoothAddress`.
[noexcept] void QBluetoothAddress::clear()
Establece la dirección Bluetooth en 00:00:00:00:00:00.
[noexcept] bool QBluetoothAddress::isNull() const
Devuelve «true» si la dirección Bluetooth es nula; en caso contrario, devuelve «false».
QString QBluetoothAddress::toString() const
Devuelve la dirección Bluetooth como una cadena con el formato XX:XX:XX:XX:XX:XX.
[noexcept] quint64 QBluetoothAddress::toUInt64() const
Devuelve esta dirección Bluetooth como un valor de tipo «quint64».
[noexcept default] QBluetoothAddress &QBluetoothAddress::operator=(QBluetoothAddress &&)
Asigna « other » a esta instancia de « QBluetoothAddress ».
Elementos no miembros relacionados
[noexcept, since 6.6] size_t qHash(const QBluetoothAddress &key, size_t seed = 0)
Devuelve el valor hash de ` key`, utilizando ` seed ` como semilla para el cálculo.
Esta función se introdujo en Qt 6.6.
bool operator!=(const QBluetoothAddress &a, const QBluetoothAddress &b)
Devuelve « true » si las dos direcciones Bluetooth a y b no coinciden; en caso contrario, devuelve « false ».
bool operator<(const QBluetoothAddress &a, const QBluetoothAddress &b)
Devuelve «true» si la dirección Bluetooth a es menor que b; en caso contrario, devuelve «false».
bool operator==(const QBluetoothAddress &a, const QBluetoothAddress &b)
Devuelve « true » si las dos direcciones Bluetooth « a » y « b » son iguales; en caso contrario, devuelve « 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.