Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Millisecond timer with pause (QTime)



  • Hi all, i need a millisecond timer with the ability to pause and resume.

    It appears that QTime does not have the ability to pause which is a shame, so i tried to create my own pause facility which did not work.
    i basically stored the elapsed time when paused:
    @Time = myTimer->elapsed();@
    and when resumed i set the time to Time:
    @myTimer->setHMS(0,0,0,Time);@

    this doesnt work and i am wondering if there is any other way for my to implement Pause on a timer?




Log in to reply