PDA

View Full Version : QTime error?



roxton
19th October 2010, 18:38
Hello! I'm trying to use QTime to convert some milliseconds values to the formatted time string representation. But I failed with that. Here is the simple example that gives me an empty string:



QTime t;
t.addMSecs (1000);
qDebug() << t.toString();


P.S. I have Qt 4.6.2 on Linux 32 bit.

wysota
19th October 2010, 19:00
QTime::addMSecs() returns a copy of the time object with miliseconds added. The original object is not modified.

roxton
19th October 2010, 22:06
Thanks! You saved me from the madness!!! :)