Filters rows matching a regular expression. More...
Import Statement: | import Felgo 4.0 |
Since: | Felgo 2.18.1 |
Inherits: |
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 } }
caseSensitivity : Qt::CaseSensitivity |
This property holds the caseSensitivity of the filter.
enabled : bool |
This property holds whether the filter is enabled. A disabled filter will accept every rows unconditionally (even if it's inverted).
By default, filters are enabled.
inverted : bool |
This property holds whether the filter is inverted. When a filter is inverted, a row normally accepted would be rejected, and vice-versa.
By default, filters are not inverted.
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 expression syntax to use. This allows to change the filter's behavior.
It supports one of the following values:
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. |
See also pattern.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: