Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-80429

Less digits from QVariant::toString() for float and double values

    XMLWordPrintable

Details

    Description

      Users have requested to have similar amount of digits from QVariant::toString() as in Qt4 .

      toString() is used often to display values on GUI and it is unusable if the output has too many digits.

      Example:

      float value = 252.7;
       QVariant var = QVariant::fromValue(value);
       qDebug() << var.toString(); //Qt4: "252.7", Qt5: "252.6999969482422"

       

      Users wish to have similar output from QVariant::toString() as in Qt4.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              thiago Thiago Macieira
              tero.pelkonen Tero Pelkonen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes