QBluetoothHostInfo Class

QBluetoothHostInfo 类封装了本地QBluetooth 设备的详细信息。更多

Header: #include <QBluetoothHostInfo>
qmake: QT += bluetooth

公共函数

QBluetoothHostInfo()
QBluetoothHostInfo(const QBluetoothHostInfo &other)
~QBluetoothHostInfo()
QBluetoothAddress address() const
QString name() const
void setAddress(const QBluetoothAddress &address)
void setName(const QString &name)
QBluetoothHostInfo &operator=(const QBluetoothHostInfo &other)
bool operator!=(const QBluetoothHostInfo &a, const QBluetoothHostInfo &b)
bool operator==(const QBluetoothHostInfo &a, const QBluetoothHostInfo &b)

详细描述

该类保存本地蓝牙设备的名称和地址。

成员函数文档

QBluetoothHostInfo::QBluetoothHostInfo()

构造一个空的 QBluetoothHostInfo 对象。

QBluetoothHostInfo::QBluetoothHostInfo(const QBluetoothHostInfo &other)

构建一个新的 QBluetoothHostInfo,它是other 的副本。

[noexcept] QBluetoothHostInfo::~QBluetoothHostInfo()

摧毁QBluetoothHostInfo.

QBluetoothAddress QBluetoothHostInfo::address() const

QBluetoothAddress 的形式返回蓝牙地址。

另请参阅 setAddress() 。

QString QBluetoothHostInfo::name() const

返回主机信息对象的用户可见名称。

另请参阅 setName()。

void QBluetoothHostInfo::setAddress(const QBluetoothAddress &address)

为该蓝牙主机信息对象设置蓝牙address

另请参阅 address()。

void QBluetoothHostInfo::setName(const QString &name)

设置主机信息对象的name

另请参阅 name()。

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

QBluetoothHostInfo 实例指定other

相关非会员

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

如果ab 不相等,则返回true ,否则返回false

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

如果ab 相等,则返回true ,否则返回false

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