Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. QThread and QThreadPool coexistence

QThread and QThreadPool coexistence

Scheduled Pinned Locked Moved Solved Qt for Python
qt for python
5 Posts 2 Posters 420 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.
  • B Offline
    B Offline
    borisruna
    wrote on last edited by
    #1

    Is it OK to create a QThreadPool that spawns workers, when your application already has a QThread , or do I have to use only a single QThreadPool in the application, that spawns QRunnables and work with those?

    Thank you in advance!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      These two have two different use cases so yes, you can use both in the same application.

      What is your use case ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • B Offline
        B Offline
        borisruna
        wrote on last edited by
        #3

        I would like to have a long running QThread that captures my webcam with OpenCV, and would like to be possible to use QThreadPool to use python's requests library to POST screenshots to a web server when a user clicks a button.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I don't see any issue using both.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • B Offline
            B Offline
            borisruna
            wrote on last edited by
            #5

            Much appreciated @SGaist!

            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