QBluetoothAddress Class
A classe QBluetoothAddress atribui um endereço ao dispositivo Bluetooth. Mais...
| Cabeçalho: | #include <QBluetoothAddress> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Bluetooth) target_link_libraries(mytarget PRIVATE Qt6::Bluetooth) |
| qmake: | QT += bluetooth |
Funções 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 &&) |
Não-membros 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) |
Descrição detalhada
Esta classe armazena um endereço Bluetooth de maneira independente da plataforma e do protocolo.
Documentação das funções de membro
[constexpr noexcept] QBluetoothAddress::QBluetoothAddress()
Cria um endereço Bluetooth nulo.
[explicit] QBluetoothAddress::QBluetoothAddress(const QString &address)
Cria um novo endereço Bluetooth e atribui a ele o valor “ address ”.
O formato de address pode ser XX:XX:XX:XX:XX:XX ou XXXXXXXXXXXX, em que X é um dígito hexadecimal. Não há distinção entre maiúsculas e minúsculas.
[explicit constexpr noexcept] QBluetoothAddress::QBluetoothAddress(quint64 address)
Cria um novo endereço Bluetooth e atribui a ele o endereço address.
[constexpr noexcept default] QBluetoothAddress::QBluetoothAddress(QBluetoothAddress &&)
Move cria uma instância de ` QBluetoothAddress`.
[noexcept] void QBluetoothAddress::clear()
Define o endereço Bluetooth como 00:00:00:00:00:00.
[noexcept] bool QBluetoothAddress::isNull() const
Retorna true se o endereço Bluetooth for nulo; caso contrário, retorna false.
QString QBluetoothAddress::toString() const
Retorna o endereço Bluetooth como uma string no formato XX:XX:XX:XX:XX:XX.
[noexcept] quint64 QBluetoothAddress::toUInt64() const
Retorna esse endereço Bluetooth como um valor do tipo `quint64`.
[noexcept default] QBluetoothAddress &QBluetoothAddress::operator=(QBluetoothAddress &&)
Atribui o other a esta instância do QBluetoothAddress.
Não-membros relacionados
[noexcept, since 6.6] size_t qHash(const QBluetoothAddress &key, size_t seed = 0)
Retorna o valor hash para o ` key`, utilizando ` seed ` como semente para o cálculo.
Essa função foi introduzida no Qt 6.6.
bool operator!=(const QBluetoothAddress &a, const QBluetoothAddress &b)
Retorna ` true ` se os dois endereços Bluetooth ` a ` e ` b ` não forem iguais; caso contrário, retorna ` false`.
bool operator<(const QBluetoothAddress &a, const QBluetoothAddress &b)
Retorna `true` se o endereço Bluetooth a for menor que b; caso contrário, retorna `false`.
bool operator==(const QBluetoothAddress &a, const QBluetoothAddress &b)
Retorna ` true ` se os dois endereços Bluetooth ` a ` e ` b ` forem iguais; caso contrário, retorna ` 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.