QMqttTopicName#
The QMqttTopicName
class represents a MQTT topic name. More…
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#
QMqttTopicName
is a thin wrapper around a QString providing an expressive data type for MQTT topic names. Beside the benefits of having a strong type preventing unintended misuse, QMqttTopicName
provides convenient functions related to topic names like isValid()
or levels()
.
See also
- class PySide6.QtMqtt.QMqttTopicName(name)#
PySide6.QtMqtt.QMqttTopicName([name=””])
- Parameters:
Creates a new MQTT topic name as a copy of name
.
Creates a new MQTT topic name with the specified name
.
- PySide6.QtMqtt.QMqttTopicName.isValid()#
- Return type:
bool
Returns true
if the topic name is valid according to the MQTT standard section 4.7, or false
otherwise.
- PySide6.QtMqtt.QMqttTopicName.levelCount()#
- Return type:
int
Returns the total number of topic levels.
- PySide6.QtMqtt.QMqttTopicName.levels()#
- Return type:
list of strings
Returns the topic levels.
- PySide6.QtMqtt.QMqttTopicName.name()#
- Return type:
str
Returns the topic name.
See also
- PySide6.QtMqtt.QMqttTopicName.__ne__(rhs)#
- Parameters:
- Return type:
bool
Returns true
if the topic names lhs
and rhs
are different, otherwise returns false
.
- PySide6.QtMqtt.QMqttTopicName.setName(name)#
- Parameters:
name – str
Sets the topic name to name
.
See also
- PySide6.QtMqtt.QMqttTopicName.swap(other)#
- Parameters:
other –
PySide6.QtMqtt.QMqttTopicName
Swaps the MQTT topic name other
with this MQTT topic name. This operation is very fast and never fails.