Building a timer
I am working on building an app in which when a mouse area is clicked a timer starts and on clicking the other button the timer stops. I am having problems in including the timer. I tried using NumberAnimation but it does not work properly. Kindly help
welcome to devnet
You might want to have a look on to "QTime::currentTime()":http://qt-project.org/doc/qt-4.8/qtime.html#currentTime
The difference of 2 time readings shall provide you the result you are looking for.
Thank you Koahnig for the reply
I looked into the link given by you, but couldn't use it in code as I am not sure in which file I should include it.
You have to include QTime in the file you make the call in.
I included QTime in the file and included the timer.h and timer.cpp file, but i am still not getting the output when i build the code.
The Timer is working properly. Thanks everyone for the support.