- 将QString类型转化为float类型
QString data;
float num = data.toFloat();
- 将float类型转化为QString类型
float num = 1.11111;
QString data = QString(“%1”).arg(num);
QString data;
float num = data.toFloat();
float num = 1.11111;
QString data = QString(“%1”).arg(num);