[Qt-interest] Simple question regarding the threadsdocumentation

Patric userqt at gmail.com
Thu Jun 18 13:23:24 CEST 2009


Oh. :)
Yes, I see, sockets in QUdpSocket. Not signal sockets.
Thanks :)

Patric

----- Original Message ----- 
From: "Sean Harmer" <sean.harmer at maps-technology.com>
To: <qt-interest at trolltech.com>
Sent: Thursday, June 18, 2009 1:52 PM
Subject: Re: [Qt-interest] Simple question regarding the 
threadsdocumentation


> Hi,
>
> On Thursday 18 Jun 2009 11:36:11 Patric wrote:
>> I see what you mean... but I'm connecting one object of type MainWindow 
>> to
>> another of type TestManager.
>>
>> testManager.moveToThread(MyThread::myThread);
>>
>> connect(this, SIGNAL(mainSignal()), &testManager, SLOT(onMainSignal()));
>> connect(&testManager, SIGNAL(threadSignal()), this,
>> SLOT(onThreadSignal()));
>>
>>
>>
>> And I'm just moving the testManager object to MyThread, and am connecting
>> the MainWindow object to the TestManager object. And vice versa. And it's
>> working.
> That is because the connect statement will detect that you are making a
> connection that crosses thread boundaries and will use the QueuedConnect 
> type
> automatically. This works by posting an event in the receiving objects 
> event
> loop. That is why you must have an event loop running in a thread that you
> wish to receive signals from another thread.
>
> The warning in the docs is related to event driven classes like QSocket
> classes not to classes in general.
>
> Sean
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus 
> signature database 4098 (20090522) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
> 


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com






More information about the Qt-interest-old mailing list