[Interest] QThreads: There's no one way to "do it right"! :)

alexander golks alex at golks.de
Wed Jan 23 09:29:15 CET 2013


Am Wed, 23 Jan 2013 11:56:55 +0400
schrieb Konstantin Tokarev <annulen at yandex.ru>:

> > My rule of thumb is that, if you're doing a simple but compute
> > intensive task where you don't want communication via signal/slots
> > (probably thats what the author of the last post meant by not needing
> > event loop), go with subclassing QThread.
> 
> Actually, you *can* communicate with outside world by emitting signals
> in this approach. What you maybe should not do is to have slots in your
> thread class because they *won't* run in the working thread.

but if you connect them queued, then they are executed in the thread, or not?

personally i use qthread the way it fits best at my current project. in the
end it depends on how you design and setup your threaded worker.

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130123/2b5f014f/attachment.sig>


More information about the Interest mailing list