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

Number.fromLocaleString is stricter than DoubleValidator

XMLWordPrintable

    • 3359b29c99581f52acf033489ad35884a01ccac8 (qt/qtbase/5.15)

      [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.

        1. qtbug75110.zip
          2 kB
        2. separators.qml
          0.8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes