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

QLineEdit setInputMask and required character(s)

    XMLWordPrintable

Details

    Description

      Setting a required character does not work properly. A space is added instead of doing nothing if the value entered is not valid for the required field but is valid for the following one.

      To reproduce:

      #include <QApplication>
      #include <QLineEdit>
      
      int main(int argc, char *argv[])
      {
      	QApplication app(argc, argv);
      
      	QLineEdit *le = new QLineEdit;
      	le->setInputMask("D000"); // le->setInputMask("AA0AA0");
      	le->show();
      
      	return app.exec();
      }
      

      CASE le->setInputMask("D000");
      entering 00 return " 00"

      CASE le->setInputMask("AA0AA0");
      entering 00 return " 0 0"

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            carochao Caroline Chao (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes