AllOfFilter QML Type
Combines multiple filters using logical AND in a SortFilterProxyModel. More...
| Import Statement: | import QtQml.Models |
| Since: | Qt 6.12 |
| Status: | Technology preview |
This type is in technology preview and is subject to change.
Properties
- filters : list<Filter>
Detailed Description
AllOfFilter groups a set of child filters and finds a matching row or column only when all child filters accept it. It is equivalent to applying multiple filters directly to SortFilterProxyModel, but allows the group itself to be enabled, disabled, or inverted as a single unit.
The following snippet shows how AllOfFilter can be used to include only rows where status is "active" and favorite is true:
SortFilterProxyModel {
sourceModel: model
filters: [
AllOfFilter {
ValueFilter {
roleName: "parent";
value: "root"
}
ValueFilter {
roleName: "status";
value: "active"
}
}
]
}Property Documentation
filters : list<Filter>
The list of child filters evaluated with logical AND. A row is accepted if all the filters in this list accepts it.
This is the default property, so filters can be declared as direct children without the filters keyword:
AllOfFilter {
ValueFilter { roleName: "status"; value: "active" }
ValueFilter { roleName: "parent"; value: "root" }
}© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.