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

Number.fromLocaleString is stricter than DoubleValidator

    XMLWordPrintable

Details

    • 3359b29c99581f52acf033489ad35884a01ccac8 (qt/qtbase/5.15)

    Description

      [Original issue text here, but see comments below]

      DoubleValidator with a locale where a comma is used a separator is not working as expected.
      It is working with IntValidator.

      Please find the sample attached and enter 12,34 in Integer field, it will turn red as IntValidator correctly determines that it is invalid. The correct thousand separator based on the format is 1,234
      But when 12,34.1 is entered in the decimal field, it will remain in black. As DoubleValidator does not validate the string based on the locale supplied.

      Attachments

        1. qtbug75110.zip
          2 kB
        2. separators.qml
          0.8 kB

        Issue Links

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

          Activity

            People

              fabiankosmale Fabian Kosmale
              shmittal Shveta Mittal
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes