I am using Qt and want to print a data value (double) in a label; however, the trailing zeros are lopped off. I know in C I can use printf("%0.1f", data) to preserve the trailing zeros.
I looked at QString's arg function but that only allows the overall field width to be set. setNum and number each allow the precision to be set but that's not right either.
Example code:
double data = 1.0;
label->setText( QString().number( data );