[SOLVED] truncating the QTime
-
qDebug() << iter->getTime_log()[0].time();
Output
QTime("08:34:40.244")Any way to truncate the seconds part of this time?
I want it to be:
QTime("08:34:40") -
Hi,
qDebug() << "QTime(\"" << iter->getTime_log()[0].time().toString("hh:mm::ss") << "\")";
-
@Lorence
it ask the time object (from time() ) to convert to a string (ToString) using the format
hours:minutes:seconds.
Since the milliseconds are not listed, they will not be there. -
@Lorence
Hmm, dont the format work for you ?
Not sure why you want to do anything to the seconds. -
@Lorence
well you basically just ask it to use another format.
8/9