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

Feature Request: Enable using Locale and its NumberOptions for DoubleValidator

    XMLWordPrintable

Details

    Description

      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
              }
          }
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: