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

QML TextField does not respect DoubleValidator top or bottom

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.1.1, 5.2.0 Beta1
    • None
    • 64-bit linux, win7 64 bit

    Description

      A DoubleValidator 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 (Ex. "bottom: -10" will prevent numbers < -99; "top: 359" will prevent numbers > 999). However, "acceptableInput" is false if the value is greater than "top", or less that "bottom".

      The following code reproduces the issue:

      TextField {
        validator: DoubleValidator {
          bottom: -10 //(incorrectly allows numbers -11 to -99)
          top: 355    //(incorrectly allow numbers 356 to 999)
          notation: DoubleValidator.StandardNotation
        }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            nikulabs Ben
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes