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

Integrate with JavaScript RegExp object

    XMLWordPrintable

Details

    • 31b972b12db4497f1c3ba1762d784c7315e75b62

    Description

      Javascript has a RegExp object, which should be usable in places (like QRegExpValidator) which require a QRegExp. Currently the below snippet does not work in QML, when someone with a javascript background would like it to.

      TextInput { id: strInput;
      validator: QRegExpValidator {
      regExp: /[a-zA-z]

      {2,4}

      /
      }
      }

      the specific error was 'validators.qml:18: Unable to assign null to QRegExp'.

      This isn't a bug because the documentation doesn't say that this should work - but if it is not scheduled to be implemented soon the documentation should probably mention that it doesn't work.

      Attachments

        Issue Links

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

          Activity

            People

              martjone Martin Jones (closed Nokia identity) (Inactive)
              aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes