QString str1 = "1234.56"; double val = str1.toFloat(); // val == 1234.56
float pi = 3.14; QString b = QString::number(pi);