このページでは

QMqttSubscriptionProperties Class

QMqttSubscriptionProperties クラスは、QMqttClient がトピックフィルターを購読する際にサーバーに渡すことができる設定オプションを表します。詳細...

ヘッダー: #include <QMqttSubscriptionProperties>
CMake: find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake: QT += mqtt

パブリック関数

(since 6.4) bool noLocal() const
(since 6.4) void setNoLocal(bool noloc)
void setSubscriptionIdentifier(quint32 id)
void setUserProperties(const QMqttUserProperties &user)
quint32 subscriptionIdentifier() const
QMqttUserProperties userProperties() const

詳細な説明

注:サブスクリプション プロパティは MQTT 5.0仕様の一部であり、それより低いプロトコルレベルで接続する場合は使用できません。詳細については、QMqttClient::ProtocolVersion を参照してください。

メンバ関数のドキュメント

[since 6.4] bool QMqttSubscriptionProperties::noLocal() const

サブスクリプションが同じトピックに関するローカルメッセージを受信しない場合、true を返します。

この関数は Qt 6.4 で導入されました。

setNoLocal()も参照してください 。

[since 6.4] void QMqttSubscriptionProperties::setNoLocal(bool noloc)

ローカルメッセージを受信しないよう、サブスクリプションオプションを設定します。クライアントが、既存のローカルサブスクリプションと同じトピックのメッセージをパブリッシュした場合、サーバーはデフォルトでそのメッセージをクライアントに返送します。noloc がtrueに設定されている場合、ブローカーは同じクライアントがパブリッシュしたメッセージを一切送信しません。

この関数は Qt 6.4 で導入されました。

noLocal()も参照してください 。

void QMqttSubscriptionProperties::setSubscriptionIdentifier(quint32 id)

サブスクリプション識別子をid に設定します。

subscriptionIdentifier()も参照してください 。

void QMqttSubscriptionProperties::setUserProperties(const QMqttUserProperties &user)

ユーザープロパティを「user 」に設定します。

userProperties()も参照してください 。

quint32 QMqttSubscriptionProperties::subscriptionIdentifier() const

このサブスクリプションを表すために使用されるサブスクリプション識別子を返します。

「setSubscriptionIdentifier()」も参照してください 。

QMqttUserProperties QMqttSubscriptionProperties::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.