Qt double  float保留两位小数

 

double p9_d = P9_Value.toDouble();
float p9_f = P9_Value.toFloat();
QString p9_str2 = QString::number(p9_f, 'f', 2);

P9_Value = p9_str2.append("h");

 

 

 

 

 

 

 

####################

相关文章: