QElapsedTimer
is a means of measuring the time. It doesn't provide a way of returning control to your code when a given amount of time elapses, since it doesn't have any blocking methods. It also doesn't have any signals/callbacks.
The only way of using a QElapsedTimer
to provide accurate interval timing is to spin: in a tight loop you keep checking the timer until a given amount of time has passed, then you continue with execution of your code. Unless it would be used sparingly - say only during application startup - this has horrible impact on battery life and energy consumption. It's a hack that has very specific uses and is not needed in ordinary QML code.
What is the problem that you're trying to solve?