Auf dieser Seite

QBluetoothAddress Class

Die Klasse „QBluetoothAddress“ weist dem Bluetooth-Gerät eine Adresse zu. Mehr...

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

Öffentliche Funktionen

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)

Ausführliche Beschreibung

Diese Klasse enthält eine Bluetooth-Adresse auf plattform- und protokollunabhängige Weise.

Dokumentation der Mitgliedsfunktionen

[constexpr noexcept] QBluetoothAddress::QBluetoothAddress()

Erstellt eine leere Bluetooth-Adresse.

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

Erstellt eine neue Bluetooth-Adresse und weist ihr „ address “ zu.

Das Format von address kann entweder XX:XX:XX:XX:XX:XX oder XXXXXXXXXXXX lauten, wobei X für eine Hexadezimalziffer steht. Die Groß-/Kleinschreibung spielt keine Rolle.

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

Erstellt eine neue Bluetooth-Adresse und weist ihr die Adresse address zu.

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

Erstellt eine Instanz von ` QBluetoothAddress`.

[noexcept] void QBluetoothAddress::clear()

Setzt die Bluetooth-Adresse auf 00:00:00:00:00:00.

[noexcept] bool QBluetoothAddress::isNull() const

Gibt „true“ zurück, wenn die Bluetooth-Adresse null ist, andernfalls „false“.

QString QBluetoothAddress::toString() const

Gibt die Bluetooth-Adresse als Zeichenfolge im Format XX:XX:XX:XX:XX:XX zurück.

[noexcept] quint64 QBluetoothAddress::toUInt64() const

Gibt diese Bluetooth-Adresse als „quint64“ zurück.

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

Weist „ other “ dieser „ QBluetoothAddress “-Instanz zu.

Verwandte Nicht-Mitglieder

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

Gibt den Hash-Wert für die ` key` zurück, wobei ` seed ` als Startwert für die Berechnung verwendet wird.

Diese Funktion wurde in Qt 6.6 eingeführt.

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

Gibt „ true “ zurück, wenn die beiden Bluetooth-Adressen „ a “ und „ b “ nicht identisch sind; andernfalls wird „ false “ zurückgegeben.

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

Gibt „true“ zurück, wenn die Bluetooth-Adresse a kleiner als b ist; andernfalls wird „false“ zurückgegeben.

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

Gibt „ true “ zurück, wenn die beiden Bluetooth-Adressen „ a “ und „ b “ identisch sind; andernfalls wird „ false “ zurückgegeben.

© 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.