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

When having an InputMask and a Validator set on a QLineEdit then the validator will not validate properly.

XMLWordPrintable

      When having an InputMask and a Validator set on a QLineEdit then the validator will not validate properly.
      An example:
      QLineEdit edit(&d);
      QRegExp rx("-?
      d

      {1,3}

      "); // <--- allow only digits
      QValidator *validator = new QRegExpValidator(rx, &edit);
      edit.setValidator(validator);
      edit.setInputMask("#nnn"); // <--- allow chars

      In the above example we will notice that the user will be allowed to enter characters on the lineedit but normally the validator should not allow that.

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

            bjnilsen Bjørn Erik Nilsen
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes