
Originally Posted by
rajesh
ToddAtWSU,
do you mean this:
double time = 1.3333;
QString str = QString("%04.2f").arg(time );
in this case str storing 1.3333.2f as I checked in Qt4.3.1
or
str = QString("%04.2f").arg(time); also not giving correct result
so, what is the syntax?
Sorry I meant
char str[16];
sprintf( str, "%04.2f", number ); // I believe this is correct using sprintf
char str[16];
sprintf( str, "%04.2f", number ); // I believe this is correct using sprintf
QString str = QString(str);
To copy to clipboard, switch view to plain text mode
But I see you got the answer.
Bookmarks