En esta página

RoleSorter QML Type

Ordena los datos en un SortFilterProxyModel basándose en el nombre del rol configurado. Más...

Import Statement: import QtQml.Models
Since: Qt 6.10
Inherits:

Sorter

Status: Preliminary

Este tipo está en desarrollo y está sujeto a cambios.

Propiedades

Descripción detallada

RoleSorter permite al usuario ordenar los datos según el nombre del rol configurado en el modelo fuente.

El RoleSorter puede configurarse en el modelo proxy de filtro de ordenación como se indica a continuación,

SortFilterProxyModel {
    model: sourceModel
    sorters: [
        RoleSorter { roleName: "firstname" }
    ]
}

Documentación de Propiedades

roleName : string

Esta propiedad contiene el nombre del rol que se utilizará para ordenar los datos.

El valor por defecto es display role.

© 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.