Hot to display current value of a qtimer?
-
Hi, i am beginner in Qt:
I have no idea how to get value of a timer and display it on a textbox dynamicly?
Thanks -
Hi,
A QTimer is probably not what you want to use. A timer is a class to control time, not to display time. QTimer gives an identifier and ways to expire on a elapsed time in sequence or just ones.
There is QTime on the other hand that is used for the human readable time in UTC format and is able to be converted to all kinds of human readable times.
I think (just guessing goes I have no clue to what you want do display) that QTime::elapsed() is the function for you for a simple msec time to display.
Maybe explain in detail what you need, then a better answer could be made if this is not the correct one. -
QElapsedTimer is probably the class you're looking for.