PDA

View Full Version : QTimer in QThread - Seem to be always 5 seconds



bazmrl
11th August 2010, 16:20
I have a QTimer in a QThread that should fire every 50ms (I pass 50 to
I am developing an application with Qt 4.6.3 under Linux using threads and timers.

If I create a QTimer and start it with a 50ms timeout it actually fires every 5000ms. If I change 50 to 100 I still get a timeout interval of 5000ms.

I have tried startTimer and timerEvent and QBasicTimer but get the same problem.

It appears to have something to do with the event loop.

Any suggestions as to what is happening?

daemonna
11th August 2010, 22:25
can you post code?

bazmrl
13th August 2010, 09:53
I have since resolved the problem. I was using QextSerialPort, as written there is an implicit timeout wait, hence the block.
Thanks for the assistance.