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

QIntValidator change in behaviour from qt3 to qt4

    XMLWordPrintable

Details

    Description

      Considering the scenario:

      lineEdit->setValidator(new QIntValidator(10, 200, 0));
      lineEdit->setInputMask("D90");
      lineEdit->setText("99");

      lineEdit->hasAcceptableInput() returns false although the third parameter in the mask is optional.
      Seems the input mask "D90" forces a space to be added at the end of the string for values < 100 e.g. "99 " then QIntValidator parses the string and says the space is an invalid int char.
      In qt3.3.3 the whitespace was stripped off before validation:

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes