本页内容

QMqttUnsubscriptionProperties Class

QMqttUnsubscriptionProperties 类表示QMqttClient 在从主题过滤器取消订阅时可传递给服务器的配置选项。更多内容...

头文件: #include <QMqttUnsubscriptionProperties>
CMake: find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake: QT += mqtt

公共函数

void setUserProperties(const QMqttUserProperties &user)
QMqttUserProperties userProperties() const

详细说明

注意:取消订阅 属性是 MQTT 5.0 规范的一部分,在连接到较低协议层时无法使用。有关更多信息,请参阅QMqttClient::ProtocolVersion 。

成员函数文档

void QMqttUnsubscriptionProperties::setUserProperties(const QMqttUserProperties &user)

将用户属性设置为user 。

另请参阅 userProperties()。

QMqttUserProperties QMqttUnsubscriptionProperties::userProperties() const

返回用户指定的属性。

另请参阅 setUserProperties()。

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