QMqttMessageStatusProperties Class
La classe QMqttMessageStatusProperties rappresenta le informazioni aggiuntive fornite dal server durante la consegna dei messaggi. Per saperne di più...
| Intestazione: | #include <QMqttMessageStatusProperties> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Mqtt) target_link_libraries(mytarget PRIVATE Qt6::Mqtt) |
| qmake: | QT += mqtt |
Funzioni pubbliche
| QString | reason() const |
| QMqtt::ReasonCode | reasonCode() const |
| QMqttUserProperties | userProperties() const |
Descrizione dettagliata
A seconda del livello di QoS di un messaggio inviato tramite ` QMqttClient::publish()`, un server riporta lo stato di consegna. Oltre al ` QMqtt::MessageStatus`, il server potrebbe includere informazioni complementari. Queste vengono rese disponibili agli utenti tramite `QMqttMessageStatusProperties`.
Nota: le proprietà di statodei messaggi fanno parte della specifica MQTT 5.0 e non possono essere utilizzate quando ci si connette con un livello di protocollo inferiore. Per ulteriori informazioni, consultare QMqttClient::ProtocolVersion.
Documentazione delle funzioni membro
QString QMqttMessageStatusProperties::reason() const
Restituisce la stringa che indica il motivo per cui la consegna del messaggio non è andata a buon fine.
QMqtt::ReasonCode QMqttMessageStatusProperties::reasonCode() const
Restituisce il codice di errore relativo a una consegna del messaggio non riuscita.
QMqttUserProperties QMqttMessageStatusProperties::userProperties() const
Restituisce le proprietà specificate in associazione a un messaggio.
© 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.