A ProxyRole extracting data from a source role via a regular expression. More...
Import Statement: | import Felgo 4.0 |
Since: | Felgo 3.9.0 |
Inherits: |
A RegExpRole is a ProxyRole that provides a role for each named capture group of its regular expression pattern.
In the following example, the date
role of the source model will be extracted in 3 roles in the proxy moodel: year
, month
and day
.
SortFilterProxyModel { sourceModel: eventModel proxyRoles: RegExpRole { roleName: "date" pattern: "(?<year>\\d{4})-(?<month>\\d{2})-(?<day>\\d{2})" } }
caseSensitivity : Qt::CaseSensitivity |
This property holds the caseSensitivity of the regular expression.
pattern : QString |
This property holds the pattern of the regular expression of this RegExpRole. The RegExpRole will expose a role for each of the named capture group of the pattern.
roleName : QString |
This property holds the role name that the RegExpRole is using to query the source model's data to extract new roles from.
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: