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

There doesn't appear to be a list of text-field validators

    XMLWordPrintable

Details

    • All
    • fd7a6eac6b (qt/qtdeclarative/6.2) 108eb261f8 (qt/qtdeclarative/6.3) 48b24f762f (qt/qtdeclarative/dev) fd7a6eac6b (qt/tqtc-qtdeclarative/6.2) 108eb261f8 (qt/tqtc-qtdeclarative/6.3) 48b24f762f (qt/tqtc-qtdeclarative/dev)

    Description

      I was reading the doc for the QML SpinBox, one of whose properties is a "validator." It turns out that there are different kinds of validators, but there is no comprehensive reference to them that I can find. This document says only: "By default, SpinBox uses IntValidator to accept input of integer numbers." But it doesn't provide a list or even mention the other validators.

      Version 5 and 6 examples are (there may be other controls that use a validator too):

      https://doc.qt.io/qt-5/qml-qtquick-controls2-spinbox.html#validator-prop
      https://doc.qt.io/qt-6/qml-qtquick-controls2-spinbox.html#validator-prop

      The docs for other validators that I found through a string search for "validator":

      https://doc.qt.io/qt-6/qml-qtquick-doublevalidator.html

      https://doc.qt.io/qt-6/qml-qtquick-regularexpressionvalidator.html

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-101402
          # Subject Branch Project Status CR V

          Activity

            People

              mitch_curtis Mitch Curtis
              stoked Gavin Stokes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes