How do I convert a QTime
into seconds? I've set the time manually with time.setHMS(0,1,0);
Now when I convert this variable time
into an integer
, I want to get 60 seconds. How do I accomplish this?
You can do this:
int seconds = QTime(0, 0, 0).secsTo(time);
Try to use int seconds = QTime(0,0).secsTo(time);
It works in Qt 5.3.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With