このページでは

QMqttMessageStatusProperties Class

QMqttMessageStatusProperties クラスは、メッセージの配信中にサーバーから提供される追加情報を表します。詳細...

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

パブリック関数

QString reason() const
QMqtt::ReasonCode reasonCode() const
QMqttUserProperties userProperties() const

詳細な説明

QMqttClient::publish() によって送信されるメッセージの QoS レベルに応じて、サーバーは配信状況を報告します。QMqtt::MessageStatus に加え、サーバーによって補足情報が含まれる場合があります。これらは QMqttMessageStatusProperties を通じてユーザーに公開されます。

注:メッセージ ステータスプロパティはMQTT 5.0仕様の一部であり、より低いプロトコルレベルで接続している場合は使用できません。詳細については、QMqttClient::ProtocolVersion を参照してください。

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

QString QMqttMessageStatusProperties::reason() const

メッセージの配信に失敗した理由を示す文字列を返します。

QMqtt::ReasonCode QMqttMessageStatusProperties::reasonCode() const

メッセージの配信に失敗した際の理由コードを返します。

QMqttUserProperties QMqttMessageStatusProperties::userProperties() const

メッセージとともに指定されたプロパティを返します。

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