I suppose you are using QString::number
function . You can use the second argument of this function to specify how the conversion from double to QString will be done. Here are the outputs :
double num = 1234.4565;
qDebug()<< QString::number(num);//"1234.46"
qDebug()<< QString::number(num, 'e');//"1.234457e+03"
qDebug()<< QString::number(num, 'f');//"1234.456500"
Use
'e' format as [-]9.9e[+|-]999
'E' format as [-]9.9E[+|-]999
'f' format as [-]9.9
'g' use e or f format, whichever is the most concise
'G' use E or f format, whichever is the most concise
Assistant is my best friend ;)