Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QMqttClient::unsubscribe(...) Use of wildcards?



  • Wondering if anyone knows off the top of the head:

    Like when one is disconnecting slots:

    QObject::disconnect(obj, 0, 0, 0);
    

    can one do a :

    myClient->unsubscribe(QMqttTopicFilter("#"));
    

    to unsubscribe to all topics on a given broker? And the extension to that question is can one unsubscribe using the wildcards to only unsubscribe to a set of topics?



  • Well, it appears the topics are held in a QHash and that unsubscribe simply removes that item from the hash. So I guess that answers that!


Log in to reply