Qt保留小数点后两位

double/float  size = 2.3334524;float QString str = QString::number(size, 'f', 2); 其中f表明非科学计数法格式,2表明小数点后两位。
相关文章
相关标签/搜索