Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMqttClient::unsubscribe(...) Use of wildcards?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 174 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ThirdStrandT Offline
    ThirdStrandT Offline
    ThirdStrand
    wrote on last edited by ThirdStrand
    #1

    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?

    1 Reply Last reply
    0
    • ThirdStrandT Offline
      ThirdStrandT Offline
      ThirdStrand
      wrote on last edited by
      #2

      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!

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved