On 23 January 2013 16:30, Konstantin Tokarev <annu...@yandex.ru> wrote:
> 23.01.2013, 12:29, "alexander golks" <a...@golks.de>:
>> but if you connect them queued, then they are executed in the thread, or not?
>
> Of course no (unless you are using moveToThread(this) which you shouldn't).

@Alexander: No.

To expand on what Konstantin said: QThread is NOT a thread; QThread is
a class that manages a thread.

Why is this distinction important? Well, it means that "QThread's
slot" = "The thread manager's slot" (NOT "The thread's slot"). If you
construct the QThread in the main thread, it will live in the main
thread. It doesn't live in the new thread. So when you make a queued
connection, the QThread's slot is invoked in the main thread, not the
new thread.


Regards,
Sze-Howe
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to