double d = 123.45; QString str = QString::number(d, 'f', 3);//转换为QString qDebug() << str; //输出 123.450 相关文章: