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

TextField with regex clears text if unmatched char is typed

    XMLWordPrintable

Details

    • Android
    • b1ae151acc80254ab0ec2937c55b99223205875c (qt/qtdeclarative/dev) f839f2f3d6bcdc1a9b87a35b8f308ec5bc6c583d (qt/qtdeclarative/6.0) 39a214773d554a1a03b49a7ab08b0a60a59c8279 (qt/qtdeclarative/6.1) 1ae99163d5 (qt/tqtc-qtdeclarative/5.15-opensource)

    Description

      Use following snippet to reproduce 

      TextField {
          id: textFieldip
          validator: RegExpValidator {
              regExp: /^((?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.){0,3}(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$/
          }
      }
      

      Type some text, then type a character, dot or space, the text will be cleared all. 

      Attachments

        Issue Links

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

          Activity

            People

              bartlomiejmoskal Bartlomiej Moskal
              assam Assam Boudjelthia
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews