FilterRole QML Type

A role resolving to true for rows matching all its filters More...

Import Statement: import .
Inherits:

SingleRole

Properties

Detailed Description

A FilterRole is a ProxyRole that returns true for rows matching all its filters.

In the following example, the isAdult role will be equal to true if the age role is superior or equal to 18.

SortFilterProxyModel {
    sourceModel: personModel
    proxyRoles: FilterRole {
        name: "isAdult"
        RangeFilter { roleName: "age"; minimumValue: 18; minimumInclusive: true }
    }
}

Property Documentation

filters : string

This property holds the list of filters for this filter role. The data of this role will be equal to the true if all its filters match the model row, false otherwise.

See also Filter.