[Interest] General QTimer question

Bo Thorsen bthorsen at ics.com
Thu Dec 12 15:21:24 CET 2013


Den 12-12-2013 13:57, Jason Kretzer skrev:
> This is more a general question about the behavior of QTimer followed by
> a more specific instance of the question.
>
> What can make a QTimer not timeout()?  In a general sense, what can make
> it miss its firing?

Only one thing: When timer timeouts are delayed. This can happen if you 
starve the process so the event loop can't run. If the timeout period 
has passed twice, you still only get one timeout(). But you will always 
get one.

If you think the timer doesn't fire, you're looking at the wrong 
problem. I guarantee you that a started timer will trigger the timeout 
unless you did something to prevent it from doing so.

Problem sources:

1) Wrong timeout period.
2) Bad connect().
3) No event loop in the timer thread.
4) Event loop not allowed to run.

Bo.

-- 
Bo Thorsen, European Engineering Manager, ICS
Integrated Computer Solutions. Delivering World-Class Applications
http://ics.com/services



More information about the Interest mailing list