[Qt-interest] Signal is emitted but slot is not executed

Valentina Masi valentina.masi at altran.it
Fri Oct 8 15:24:30 CEST 2010


Hi all

My application consists of two threads. the main thread manages the application's user interface and the worker thread sends to/receives from a UDP socket. One message is sent/received with a rate of 2 seconds. A timer fires one time a second in order to update the digital clock of my application.
When the worker thread receives a message, it calls a method of the main thread; this method emits a signal connected to a slot to update the GUI(so, signals are emitted by the worker thread and slots are executed in GUI thread). Qt::connect() returns true.

At runtime, after a short time, CPU occupation starts increasing and the GUI is updated slower than one time 2 seconds.
At that time I noticed:
  1.. upon message receiving the sgnal is emitted but the relative slot is not executed
  2.. timer fires no more

Could anyone explain to me why?

Thanks in advance
Valentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101008/962b7ea8/attachment.html 


More information about the Qt-interest-old mailing list