[Qt-interest] connection between qthreads blocks my gui

franki franki at franki.eu.org
Wed Dec 15 12:52:39 CET 2010


Wednesday 15 of December 2010 05:59:54 Mandeep Sandhu napisał(a):
> > I have some gui class (mainClass), inside that class I created two
> > classes which subclass QThread, one of which is sending/receiving data
> > from rs232, lets say rs232Thread, second one is sending signal to start
> > reading from rs232,lets say cronThread. Connection is defined inside
> > mainClass like this:
> > connect(cronThread,SIGNAL(startChecking()),rs232Thread,SLOT(readWrite()),
> >Qt::QueuedConnection)
>
> Are you running an event loop in these 2 threads? For signals/slots to
> work the thread should have its event loop running (by calling
> exec()).

Hi,

Yes I was running exec in each of them, if you look into other posts in this 
thread, there is I think good explanation of what I was the problem.

best regards,
Marek

>
> HTH,
> -mandeep





More information about the Qt-interest-old mailing list