c++ - How to convert seconds (double) to QDateTime in Qt? -


i have number of seconds stored in double format (but integer values if thats concerned). convert them hh:mm:ss format string. how that? example double secs = 120; be 00:02:00.

i appreciate help.

you can create qtime object using default constructor , add seconds it:

double secs = 120;  qtime a(0,0,0); = a.addsecs(int(secs)); 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -