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

QLocale::toStrings uses E instead of e

XMLWordPrintable

    • Windows
    • 05c8a4861 (dev), 8c88a077c (dev), 31d64b725 (6.9), cbce9bbcb (6.9), 5d90dea2a (6.8), 3f3541d49 (6.8), 507d8cc0e (dev), 55c60776e (6.9), dd45d2bb0 (6.8), b4418b6e6 (tqtc/lts-6.5), b159e9a19 (tqtc/lts-6.5), 672c60ea7 (tqtc/lts-6.5), d9145dd37 (dev)
    • Foundation Sprint 127, Foundation Sprint 128

      Reproducible both in C++ and (with PySide6) in Python. Here is the Python example:

      In [1]: from PySide6.QtCore import QLocale

      In [2]: QLocale(QLocale.English).toString(1e6, 'e')
      Out[2]: '1.000000E+06'

      In [3]: QLocale(QLocale.English).toString(1e6, 'g')
      Out[3]: '1E+06'

      Note the uppercase E. The documentation, if I understand it correctly, says that it should be lowercase, like it is in Qt5:

      In [4]: from PySide2.QtCore import QLocale

      In [5]: QLocale(QLocale.English).toString(1e6, 'e')
      Out[5]: '1.000000e+06'

      In [6]: QLocale(QLocale.English).toString(1e6, 'g')
      Out[6]: '1e+06'

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

            Eddy Edward Welbourne
            testerwalksintoabar Stanislav Syekirin
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: