RoleSorter QML Type
Sort data in a SortFilterProxyModel based on configured role name. More...
Import Statement: | import QtQml.Models |
Since: | Qt 6.10 |
Inherits: | |
Status: | Preliminary |
This type is under development and is subject to change.
Properties
- roleName : string
Detailed Description
RoleSorter allows the user to sort the data according to the role name as configured in the source model.
The RoleSorter can be configured in the sort filter proxy model as below,
SortFilterProxyModel { model: sourceModel sorters: [ RoleSorter { roleName: "firstname" } ] }
Property Documentation
roleName : string |
This property holds the role name that will be used to sort the data.
The default value is display role.
© 2025 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.