In questa pagina

QBluetoothAddress Class

La classe QBluetoothAddress assegna un indirizzo al dispositivo Bluetooth. Per saperne di più...

Intestazione: #include <QBluetoothAddress>
CMake: find_package(Qt6 REQUIRED COMPONENTS Bluetooth)
target_link_libraries(mytarget PRIVATE Qt6::Bluetooth)
qmake: QT += bluetooth

Funzioni pubbliche

QBluetoothAddress()
QBluetoothAddress(const QString &address)
QBluetoothAddress(quint64 address)
QBluetoothAddress(QBluetoothAddress &&)
void clear()
bool isNull() const
QString toString() const
quint64 toUInt64() const
QBluetoothAddress &operator=(QBluetoothAddress &&)
(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)

Descrizione dettagliata

Questa classe contiene un indirizzo Bluetooth in modo indipendente dalla piattaforma e dal protocollo.

Documentazione delle funzioni membro

[constexpr noexcept] QBluetoothAddress::QBluetoothAddress()

Crea un indirizzo Bluetooth nullo.

[explicit] QBluetoothAddress::QBluetoothAddress(const QString &address)

Crea un nuovo indirizzo Bluetooth e gli assegna l'address.

Il formato dell'address e può essere XX:XX:XX:XX:XX:XX oppure XXXXXXXXXXXX, dove X è una cifra esadecimale. Non fa differenza se le lettere sono maiuscole o minuscole.

[explicit constexpr noexcept] QBluetoothAddress::QBluetoothAddress(quint64 address)

Crea un nuovo indirizzo Bluetooth e gli assegna l'address.

[constexpr noexcept default] QBluetoothAddress::QBluetoothAddress(QBluetoothAddress &&)

Crea un'istanza di ` QBluetoothAddress` tramite il costrutto `move`.

[noexcept] void QBluetoothAddress::clear()

Imposta l'indirizzo Bluetooth su 00:00:00:00:00:00.

[noexcept] bool QBluetoothAddress::isNull() const

Restituisce true se l'indirizzo Bluetooth è nullo, altrimenti restituisce false.

QString QBluetoothAddress::toString() const

Restituisce l'indirizzo Bluetooth sotto forma di stringa nel formato XX:XX:XX:XX:XX:XX.

[noexcept] quint64 QBluetoothAddress::toUInt64() const

Restituisce questo indirizzo Bluetooth come valore di tipo quint64.

[noexcept default] QBluetoothAddress &QBluetoothAddress::operator=(QBluetoothAddress &&)

Assegna " other " a questa istanza di " QBluetoothAddress ".

Non membri correlati

[noexcept, since 6.6] size_t qHash(const QBluetoothAddress &key, size_t seed = 0)

Restituisce il valore hash per l'key, utilizzando seed come seme per il calcolo.

Questa funzione è stata introdotta in Qt 6.6.

bool operator!=(const QBluetoothAddress &a, const QBluetoothAddress &b)

Restituisce " true " se i due indirizzi Bluetooth a e b non sono uguali; in caso contrario, restituisce " false".

bool operator<(const QBluetoothAddress &a, const QBluetoothAddress &b)

Restituisce true se l'indirizzo Bluetooth a è inferiore a b; in caso contrario, restituisce false.

bool operator==(const QBluetoothAddress &a, const QBluetoothAddress &b)

Restituisce " true " se i due indirizzi Bluetooth a e b sono uguali; in caso contrario, restituisce " 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.