RegExpFilter

Filters rows matching a regular expression. More...

Import Statement: import VPlayApps 1.0
Since: V-Play 2.18.1
Inherits:

RoleFilter

Properties

Detailed Description

A RegExpFilter is a RoleFilter that accepts rows matching a regular rexpression.

In the following example, only rows with their lastName role beggining with the content of textfield the will be accepted:

 TextField {
    id: nameTextField
 }

 SortFilterProxyModel {
    sourceModel: contactModel
    filters: RegExpFilter {
        roleName: "lastName"
        pattern: "^" + nameTextField.displayText
    }
 }

Property Documentation

caseSensitivity : Qt::CaseSensitivity

This property holds the caseSensitivity of the filter.


pattern : bool

The pattern used to filter the contents of the source model.

See also syntax.


roleName : string

This property holds the role name that the filter is using to query the source model's data when filtering items.


syntax : enum

The pattern used to filter the contents of the source model.

Only the source model's value having their roleName data matching this pattern with the specified syntax will be kept.

Constant Description
RegExpFilter.RegExp A rich Perl-like pattern matching syntax. This is the default.
RegExpFilter.Wildcard This provides a simple pattern matching syntax similar to that used by shells (command interpreters) for "file globbing".
RegExpFilter.FixedString The pattern is a fixed string. This is equivalent to using the RegExp pattern on a string in which all metacharacters are escaped.
RegExpFilter.RegExp2 Like RegExp, but with greedy quantifiers.
RegExpFilter.WildcardUnix This is similar to Wildcard but with the behavior of a Unix shell. The wildcard characters can be escaped with the character "".
RegExpFilter.W3CXmlSchema11 The pattern is a regular expression as defined by the W3C XML Schema 1.1 specification.

See also pattern.


Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support