Filters rows matching exactly a value. More...
| Import Statement: | import SortFilterProxyModel . |
| Inherits: |
A ValueFilter is a simple RoleFilter that accepts rows matching exactly the filter's value
In the following example, only rows with their favorite role set to true will be accepted when the checkbox is checked :
CheckBox {
id: showOnlyFavoriteCheckBox
}
SortFilterProxyModel {
sourceModel: contactModel
filters: ValueFilter {
roleName: "favorite"
value: true
enabled: showOnlyFavoriteCheckBox.checked
}
}
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.
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.
This property holds the role name that the filter is using to query the source model's data when filtering items.