Convert a number to a QString , and format it to two decimal places: double price = 89.0278; QString qtString = QString().asprintf("%0.2f", price); // 89.03.
確定! 回上一頁