QBluetoothAddress Class

The QBluetoothAddress class assigns an address to the Bluetooth device. 更多...

頭: #include <QBluetoothAddress>
qmake: QT += bluetooth

公共函數

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

詳細描述

This class holds a Bluetooth address in a platform- and protocol-independent manner.

成員函數文檔編製

[constexpr noexcept] QBluetoothAddress:: QBluetoothAddress ()

Constructs a null Bluetooth Address.

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

Constructs a new Bluetooth address and assigns address 到它。

The format of address can be either XX:XX:XX:XX:XX:XX or XXXXXXXXXXXX, where X is a hexadecimal digit. Case is not important.

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

Constructs a new Bluetooth address and assigns address 到它。

[noexcept] void QBluetoothAddress:: clear ()

Sets the Bluetooth address to 00:00:00:00:00:00.

[noexcept] bool QBluetoothAddress:: isNull () const

Returns true if the Bluetooth address is null, otherwise returns false.

QString QBluetoothAddress:: toString () const

Returns the Bluetooth address as a string of the form, XX:XX:XX:XX:XX:XX.

[noexcept] quint64 QBluetoothAddress:: toUInt64 () const

Returns this Bluetooth address as a quint64.

相關非成員

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

返迴哈希值為 key ,使用 seed 做計算種子。

該函數在 Qt 6.6 引入。

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

返迴 true if the two Bluetooth addresses a and b are not equal, otherwise returns false .

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

Returns true if the Bluetooth address a 小於 b ,否則返迴 false。

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

返迴 true if the two Bluetooth addresses a and b 相等,否則返迴 false .