Unsolved How write numbers
-
I'd like writing convert a number in a Qstring in this way:
if the numbers is: 7.4I would like convert in this way:
07.40 -
From the QString header.
QString &QString::prepend(const QString &str) QString &QString::append(const QString &str)
-
#include <QDebug> int main(int argc, char *argv[]) { double d = 7.4; QString s = QString("%1").arg(d, 5, 'f', 2, QChar('0')); qDebug() << s; }