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

Feature Request: Enable using Locale and its NumberOptions for DoubleValidator

XMLWordPrintable

      Currently, User can specify the locale to DoubleValidator but the numberOptions set for that locale does not make any difference to the validator.
      E.g, If user wants to restrict comma(,) in DoubleValidator and has set NumberOption to Locale.RejectGroupSeparator, it does not work. Please refer to the attached sample.

          TextField {
              id: myspin
              inputMethodHints: Qt.ImhFormattedNumbersOnly
              property var spinLocale: Qt.locale("C")
              validator: DoubleValidator {
                  bottom: 0.0
                  top: 100.1
                  notation: DoubleValidator.StandardNotation
              }
              Component.onCompleted: {
                  spinLocale.NumberOption = Locale.RejectGroupSeparator
                  myspin.validator.locale = myspin.spinLocale.name
              }
          }
      

        1. qtbug88453.zip
          2 kB
          Shveta Mittal
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            shmittal Shveta Mittal
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes