Qt保留小數點後兩位

double/float  size = 2.3334524;float QString str = QString::number(size, 'f', 2); 其中f表明非科學計數法格式,2表明小數點後兩位。
相關文章
相關標籤/搜索