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. Do I need to tun QMQTT in different thread to keep responsive UI ?

Do I need to tun QMQTT in different thread to keep responsive UI ?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 511 Views 1 Watching
  • 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.
  • R Offline
    R Offline
    RahibeMeryem
    wrote on last edited by
    #1

    I have several problems when I try to use qmqtt in another thread to keep my ui is responsive.

    DO I need to use it another thread or it is overhead is really small ? Is it asynchronous ?

    Main purpose is communicating between c++ and python messaging.

    Best

    aha_1980A 1 Reply Last reply
    0
    • R RahibeMeryem

      I have several problems when I try to use qmqtt in another thread to keep my ui is responsive.

      DO I need to use it another thread or it is overhead is really small ? Is it asynchronous ?

      Main purpose is communicating between c++ and python messaging.

      Best

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @RahibeMeryem said in Do I need to tun QMQTT in different thread to keep responsive UI ?:

      DO I need to use it another thread or it is overhead is really small ? Is it asynchronous ?

      No, all Qt classes are asynchronous and work with signals&slots. If you do not use blocking functions like waitFor... or sleep, you can usually keep them in the main thread.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      5
      • R Offline
        R Offline
        RahibeMeryem
        wrote on last edited by
        #3

        Yes this what I finally decided to put qmqtt stuff in the main thread which is updating UI.

        So far working good.

        One of the thing that I want to ask is to re-connection.

        disconnection is detected by signal slot an I am asking to connect again from start but its crashing.

        so I create a timer say 5 sec, checking the connection state if its not = 2 that connecting again. This one is working.

        :)

        thanks

        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