QBluetoothAddress Class

The QBluetoothAddress class assigns an address to the Bluetooth device. More...

Header: #include <QBluetoothAddress>
qmake: QT += bluetooth
Since: Qt 5.2

Public Functions

QBluetoothAddress(const QBluetoothAddress &other)
QBluetoothAddress(const QString &address)
QBluetoothAddress(quint64 address)
QBluetoothAddress()
QBluetoothAddress &operator=(const QBluetoothAddress &other)
~QBluetoothAddress()
void clear()
bool isNull() const
QString toString() const
quint64 toUInt64() const
bool operator!=(const QBluetoothAddress &a, const QBluetoothAddress &b)
bool operator<(const QBluetoothAddress &a, const QBluetoothAddress &b)
bool operator==(const QBluetoothAddress &a, const QBluetoothAddress &b)

Detailed Description

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

Member Function Documentation

QBluetoothAddress::QBluetoothAddress(const QBluetoothAddress &other)

Constructs a new Bluetooth address which is a copy of other.

QBluetoothAddress::QBluetoothAddress(const QString &address)

Constructs a new Bluetooth address and assigns address to it.

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.

QBluetoothAddress::QBluetoothAddress(quint64 address)

Constructs a new Bluetooth address and assigns address to it.

QBluetoothAddress::QBluetoothAddress()

Constructs an null Bluetooth Address.

QBluetoothAddress &QBluetoothAddress::operator=(const QBluetoothAddress &other)

Assigns other to this Bluetooth address.

QBluetoothAddress::~QBluetoothAddress()

Destroys the QBluetoothAddress.

void QBluetoothAddress::clear()

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

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.

quint64 QBluetoothAddress::toUInt64() const

Returns this Bluetooth address as a quint64.

Related Non-Members

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

Returns 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 is less than b, otherwise returns false.

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

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

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