[Qt-interest] QThread event loop running in main thread?

Thiago Macieira thiago at kde.org
Mon Dec 27 23:28:59 CET 2010


On Monday, 27 de December de 2010 18:00:44 Hannu Shemeikka wrote:
> Maybe you guys, Nokia or whoever is responsible, should update the 
> documents. Especially the QThread-stuff. It's written there that "to 
> create your own threads, subclass QThread and reimplement run()."

Why?

That is not wrong. It is accurate, even if not complete.

Like Mihail said further down the thread, the wrong thing to do is to have 
slots in the class derived from QThread and/or using moveToThread(this).

If you treat the QThread object like I said, as the object managing an 
operating system resource (the thread), not the work to be done, you're fine.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101227/d6dd8543/attachment.bin 


More information about the Qt-interest-old mailing list