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

Smallest interval of timer for QT



  • Hello all,

    I met a problem with the Timer method of QML. I set the interval to 2 milliseconds for a repeatable Timer in QML. However, It can not run every 2 milliseconds.

    Here is only a try. I tried also 5 milliseconds, 20 milliseconds, 50 milliseconds. The timer can repeatedly in the right interval higher than 50 milliseconds.

    I can not find the reason. Could someone help me to know this? Thank you!


  • Moderators

    You need to use a proper timerType. This property, however, is only available in C++. You need to expose a custom type to QML to get it.

    Keep in mind though, that 2ms is a very short period of time. It will be hard to keep it.


Log in to reply