Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved QThread and QThreadPool coexistence

    Qt for Python
    qt for python
    2
    5
    98
    Loading More Posts
    • 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
      borisruna last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • B
          borisruna last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • B
              borisruna last edited by

              Much appreciated @SGaist!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post