[Qt-interest] QThread event loop running in main thread?
Bob Hood
bhood2 at comcast.net
Mon Dec 27 19:40:30 CET 2010
On 12/27/2010 11:22 AM, Andre Somers wrote:
> Op 27-12-2010 18:21, Bob Hood schreef:
>> On 12/27/2010 9:51 AM, BRM wrote:
>>> 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.
>> Would this be it?
>>
>> http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/
> Probably. And if you read through the comments, the complaint most heard
> is: "this is not properly documented, please fix that", along with
> remarks that the "wrong" way is actually suggested in the docs...
>
> I have used several ways that I all managed to get to work, but I think
> that for general usage, the create-QObject-and-move-to-QThread way is
> the easiest to work with.
I don't know. I have a stand-alone application written using Qt 4.6.x that
performs branch management with Subversion. It supports unlimited numbers of
root and child branches, where each could have a thread running at any given
time. It uses the "wrong" way of threading (i.e., sub-classing QThread and
re-implementing run()) and everything works just fine. I've had no issues at
all with this approach.
I implemented this way before I found that article, but see no real reason to
re-factor into compliance with the "right" way as I ain't gonna fix what ain't
broken. ;)
More information about the Qt-interest-old
mailing list