RegExpFilter QML Type
Filters data in a SortFilterProxyModel by matching a role value against a regular expression. More...
| Import Statement: | import QtQml.Models |
| Since: | Qt 6.12 |
| Inherits: | |
| Status: | Technology preview |
This type is in technology preview and is subject to change.
Properties
- regExp : regexp
Detailed Description
RegExpFilter allows filtering model data using regular expression matching on a specified role.
A JavaScript regular expression literal can be assigned directly to regExp:
SortFilterProxyModel {
sourceModel: processModel
filters: RegExpFilter {
roleName: "userId"
regExp: /root/i
}
}
Property Documentation
regExp : regexp
This property holds the regular expression used to filter the data. A JavaScript regular expression literal can be assigned directly.
When the regExp has an empty pattern, the filter is inactive and all rows pass through.