PDA

View Full Version : Execute an action on regular time



valy12
20th May 2010, 22:38
Hello,

I would like to execute an action each 0.01 second. I thought to make a timeEdit and to connect it to a slot each time the value change like that :
connect(ui->timeEdit,SIGNAL(timeChanged(QTime)),this,SLOT(preF rame()));

But TimeEdit is on the format hh.mm.ss and i would like milisecond...
Moreover i don't know how to start the timeEdit...

If you have any solution or a better one, please help me! :)

SixDegrees
20th May 2010, 22:48
Try QTimer (http://doc.qt.nokia.com/4.5/qtimer.html).

valy12
21st May 2010, 10:25
Thanks, I did it with QTimer and it run. I didn't know this one :).