[Qt-interest] QThread event loop running in main thread?
BRM
bm_witness at yahoo.com
Mon Dec 27 20:20:05 CET 2010
----- Original Message ----
> From: Tom Russo <tom.km5vy at gmail.com>
> To: qt-interest at qt.nokia.com
> Sent: Mon, December 27, 2010 1:48:36 PM
> Subject: Re: [Qt-interest] QThread event loop running in main thread?
>
> On Mon, Dec 27, 2010 at 09:52, BRM <bm_witness at yahoo.com> wrote:
> > Thus far, I've done:
> >
> [...]
> > - Used QThread without modification, but found I had to run moveToThread()
> > before connecting the signals/slots to get it to work - or at least that's
>what
> > it seemed like (Qt 4.5.1).
> >
> > Two very different models, but neither have any good examples in the Qt
> > documentation. That said, I have come across several very good blog posts on
>Qt
> > Labs per QThreading - one of which is what converted me to start using the
> > second model above (no QThread derivatives), though I can't seem to find it
> > right now.
>
> You might mean this one?
>
> http://labs.qt.nokia.com/2006/12/04/threading-without-the-headache/
>
> The modification of run() described in the blog is now the default
> behavior in Qt, so subclassing is not strictly required anymore (the
> default run() implementation now calls exec()). But the documentation
> of QThread still says that it must be subclassed to be used.
>
No, I don't think so. I thought I had found a post a while back that was rather
lengthy - a lot longer than that post - about QThread and its usages, describing
the new way of using it (versus Qt3's way) and more. It's been a long time since
I read it - 6+ months at least. I'm pretty sure it was in a Qt Labs Blog.
Ben
More information about the Qt-interest-old
mailing list