[Qt-interest] same code but different results on Windows and Mac

Konrad Rosenbaum konrad at silmor.de
Sun Oct 17 09:41:24 CEST 2010


On Sunday 17 October 2010, Yifei Li wrote:
> Can someone explain why there's such a difference? Thanks

You can... ;-)

Add a few lines to your code:

In the constructors:
qDebug()<<"This object belongs to thread"<<(long)this->thread();

in main(): qDebug()<<"the main thread is"<<(long)QThread::currentThread();

and similarly in your slots:
qDebug()<<"slot xyz running in"<<(long)QThread::currentThread();

Then observe the output and read the material about signals and slots and 
threads...



	Konrad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101017/44892e3a/attachment.bin 


More information about the Qt-interest-old mailing list