QOBject::tr() with floating-point number
Solved
General and Desktop
-
I would like to get the
QMessageBox
showing the double precision value of the variablemy_double
. But I got it showing the value0
.double my_double = 0.1234567; QMessageBox::warning( nullptr, QObject::tr("Warning"), QObject::tr("The value %n is a double precision number", "", my_double), QMessageBox::Ok);
How can I do it?
-
Hi,
Are you looking for QLocale::toString ?