PDA

View Full Version : Signal / Slot issue



sicker
29th July 2011, 19:35
Hi,

i have a Database thread running and several objects in another thread. The objects request nformation by using a signal from the database thread. This works without any problem. But it seems when the database thread answers the objects with a signal itself, the signal itself gets send immediately but the slot takes several seconds before it gets called (> 30 seconds). I have been using Qt for a while and have not seen such an issue yet. The connection of the signals is queued of course.

I would greatly appreciate any help with that problem.

Kind regards,

Sicker

mcosta
29th July 2011, 21:11
Remember that slot are called when are dequeued from eventLoop.
If the receiver's performing a long time operation, it's normal to have delay.

Can you show pieces of your code?

sicker
29th July 2011, 21:53
Remember that slot are called when are dequeued from eventLoop.
If the receiver's performing a long time operation, it's normal to have delay.

Can you show pieces of your code?

Unfortunately, i do not have the code here. The receiving object is not doing anything at all. It was my first guess, that it might be too busy, but the whole processing starts after the signal from the database thread has been received. I even included some single-shot timer into the receiving objects that waits > 60 seconds before it starts working, so that all the other objects get their initialization signal from the database thread in time.

I suppose it must be some minor issue, that is not that obvious. I am gonna spend some more time tomorrow, but unfortunately i do not have any useful explaination so far.