QThread and QThreadPool coexistence
-
wrote on 26 Mar 2022, 18:44 last edited by
Is it OK to create a
QThreadPool
that spawns workers, when your application already has aQThread
, or do I have to use only a singleQThreadPool
in the application, that spawnsQRunnable
s and work with those?Thank you in advance!
-
Hi,
These two have two different use cases so yes, you can use both in the same application.
What is your use case ?
-
wrote on 26 Mar 2022, 20:24 last edited by
I would like to have a long running
QThread
that captures my webcam withOpenCV
, and would like to be possible to useQThreadPool
to use python'srequests
library toPOST
screenshots to a web server when a user clicks a button. -
I don't see any issue using both.
2/5