[Interest] QThreadPool functionality for QThreads

Frank Rueter | OHUfx frank at ohufx.com
Fri Jan 20 21:53:46 CET 2017


QRunnables with QThreadPool seem to work great in my case.
I am instantitating my main worker class inside the QRunnable now to be 
able send signals via that (e.g. runnable.worker.signal.emit()).
I tried multiple inheritance to just have one QRunnable class that can 
emit signals, but that didn't work, e.g.:
     class MyRunable(QtCore.QObject, QtCore.QRunnable()

But I'm happy with my solution now, so thanks everybody for contributing.

frank

On 20/01/17 3:08 PM, Thiago Macieira wrote:
> On quinta-feira, 19 de janeiro de 2017 07:55:12 PST Elvis Stansvik wrote:
>> Frank, another threading approach in Qt which we haven't mentioned yet
>> is QtConcurrent. I use that myself in an application where I had to
>> load a series of large tomographic volumes using VTK (so blocking
>> I/O). It might not be a good fit for your use case, but thought I
>> should mention it for brevity.
> Or you can use Thread Building Blocks too.
>




More information about the Interest mailing list