yea, my code is like with you, but the value is not expected, it will change everytime,
this is my code
int fValue; //fValue will changed in other place
mStrContext
= QString::number(fValue
/10.0,
'g',
3);
pp.drawText(x, y, mStrContext);
int fValue; //fValue will changed in other place
QString mStrContext;
mStrContext = QString::number(fValue/10.0, 'g', 3);
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.
Bookmarks