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
Post a Comment