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

REG: Quick 2 TextField doesn't respect IntValidator top, bottom

    XMLWordPrintable

Details

    • Windows

    Description

      A IntValidator for a TextField does not prevent numbers greater than the "top", or less than "bottom" from being entered.
      It instead limits to the same number of digits (Example: "bottom: 11", "top: 31").
      However, "acceptableInput" is correctly.

      The following code reproduces the issue:

       

      TextField {
      	id: intTextField
      	validator: IntValidator {
      		top: 31
      		bottom: 11
      	}
      }
      TextField {
      	// but this works
      	text: intTextField.acceptableInput ? "acceptable" : "not acceptable"
      }

       

      Attachments

        1. both.qml
          0.7 kB
        2. anim.gif
          anim.gif
          55 kB

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            codezeug codezeug
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: