yea, my code is like with you, but the value is not expected, it will change everytime,
this is my code
Qt Code:
  1. int fValue; //fValue will changed in other place
  2. QString mStrContext;
  3. mStrContext = QString::number(fValue/10.0, 'g', 3);
  4. pp.drawText(x, y, mStrContext);
To copy to clipboard, switch view to plain text mode 

when i use qDebug() print the (fValue/10.0) is also be die.