PDA

View Full Version : problem in qtimer



mohanakrishnan
26th November 2009, 10:21
hi
im using qtimer in my application.i m receiving data from serial port.if im frequently
starting and stopping the timer,at one time it does not start or stop.
in my application i need to do so after every 100 milliseconds i need to start and stop..
i m using qtimer class.Is there any class to that or on what way i should do!
i have done the same thing in csharp.There it is working.

any help is highly respected
thanks:)

Lykurg
26th November 2009, 10:26
I don't know if I get you right, but if you need a signal every 100 ms you could use a QTimeLine.

EDIT: or use QTimer::singleShot().

mohanakrishnan
26th November 2009, 10:49
ok
i ll try out with qtimeline..
thanks:)

Lykurg
26th November 2009, 10:57
ups, after rereading I figured out, that it is probably better to use a QTimer which is set to a infinitive loop. But a really other solution for you could be just to use QObject::startTimer() and let Qt handle the timer for you.

mohanakrishnan
26th November 2009, 12:55
hi
thanks for ur help i used
qtimer only and ok with this ......;)
the problem is in my side...sorry for that...