Starting the timer
-
Hey everyone i was making a simple audio recorder for my desktop. I thought using a QTimer class to start and stop timer and QTime class to make hours, mins, secs. But i later realized that i want hours to extend even after the value = 60. I have a format witth label "00:00:00". Starting from left i want secs, mins to function as usual but i want to extend hours to go on forever untill user stop the timer. Please help.
-
QTime will roll over the hours after 24 hours, you can never reach 60 hours, you can use QDateTime instead, call @int QDateTime::secsTo ( const QDateTime & other ) const@ and convert into seconds to mins and hours.
-
Hi, I want the timer format like above format "Days:Hours:Min:Secs". Please Help
-
For determining time spans you can check out posts with "qtimespan":http://qt-project.org/search/tag/qtimespan tag. There is some activity, but it did not make to the "last release (see here).":http://qt-project.org/forums/viewthread/3228/
The development source is available "here":http://gitorious.org/qtimespandevel -
[quote author="Anil Kumar" date="1357474937"]
Hi, I want the timer format like above format "Days:Hours:Min:Secs". Please Help[/quote]I don't see the problem. Santosh Reddy's post and some very basic maths solves the problem. What more is there?
-
He seems new to Qt lib I suppose...Or maybe he wanted a widget?
-
Oh! I have just started over in middle of the 2012. I hope i'm learning. But check out the software written by me. "Code Timer":https://sourceforge.net/projects/codetimer/ Jan 15th or so because i have not uploaded anything. I have to design a application icon and then say am i not suppose to know a widget. Thanks
[quote author="A.A.B.A" date="1357503392"]He seems new to Qt lib I suppose...Or maybe he wanted a widget?[/quote]
-
[quote author="Anil Kumar" date="1357572353"]"Code Timer":https://sourceforge.net/projects/codetimer/[/quote]Heh, so you press the start button, then start "learning" the language, and then press the stop button? That's a rather peculiar idea of learning a programming language ;). In my opinion, you can set that time to numeric_limits<double>::infinity() right away.
But the program itself surely is a good exercise for learning programming. So yeah... good job! :)