QMqttLastWillProperties#

The QMqttLastWillProperties class represents configuration options a QMqttClient can pass to the server when specifying the last will during connecting to a server. More

Inheritance diagram of PySide6.QtMqtt.QMqttLastWillProperties

Synopsis#

Functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

Note

Last Will properties are part of the MQTT 5.0 specification and cannot be used when connecting with a lower protocol level. See ProtocolVersion for more information.

class PySide6.QtMqtt.QMqttLastWillProperties#

PySide6.QtMqtt.QMqttLastWillProperties(arg__1)

Parameters:

arg__1PySide6.QtMqtt.QMqttLastWillProperties

PySide6.QtMqtt.QMqttLastWillProperties.contentType()#
Return type:

str

Returns the content type of the last will message.

See also

setContentType()

PySide6.QtMqtt.QMqttLastWillProperties.correlationData()#
Return type:

PySide6.QtCore.QByteArray

Returns the correlation data to identify the request.

PySide6.QtMqtt.QMqttLastWillProperties.messageExpiryInterval()#
Return type:

int

Returns the lifetime of the last will message in seconds, starting from the will delay interval.

PySide6.QtMqtt.QMqttLastWillProperties.payloadFormatIndicator()#
Return type:

PayloadFormatIndicator

Returns the payload format indicator.

PySide6.QtMqtt.QMqttLastWillProperties.responseTopic()#
Return type:

str

Returns the topic that subscribers to the last will message should respond to.

PySide6.QtMqtt.QMqttLastWillProperties.setContentType(content)#
Parameters:

content – str

Sets the content type to content.

See also

contentType()

PySide6.QtMqtt.QMqttLastWillProperties.setCorrelationData(correlation)#
Parameters:

correlationPySide6.QtCore.QByteArray

Sets the correlation data to correlation.

PySide6.QtMqtt.QMqttLastWillProperties.setMessageExpiryInterval(expiry)#
Parameters:

expiry – int

Sets the message expiry interval to expiry.

PySide6.QtMqtt.QMqttLastWillProperties.setPayloadFormatIndicator(p)#
Parameters:

pPayloadFormatIndicator

Sets the payload format indicator to p.

PySide6.QtMqtt.QMqttLastWillProperties.setResponseTopic(response)#
Parameters:

response – str

Sets the response topic to response.

See also

responseTopic()

PySide6.QtMqtt.QMqttLastWillProperties.setUserProperties(properties)#
Parameters:

propertiesQMqttUserProperties

Sets the user properties to properties.

See also

userProperties()

PySide6.QtMqtt.QMqttLastWillProperties.setWillDelayInterval(delay)#
Parameters:

delay – int

Sets the will delay interval to delay.

PySide6.QtMqtt.QMqttLastWillProperties.userProperties()#
Return type:

QMqttUserProperties

Returns the user properties.

PySide6.QtMqtt.QMqttLastWillProperties.willDelayInterval()#
Return type:

int

Returns the delay in seconds a last will message will be sent after disconnecting from the server.