이 페이지에서

RoleSorter QML Type

SortFilterProxyModel 의 데이터를 구성된 역할 이름에 따라 정렬합니다. 자세히 보기...

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

Sorter

Status: Technology preview

이 기능은 기술 미리 보기 단계에 있으며 변경될 수 있습니다.

속성

상세 설명

RoleSorter를 사용하면 소스 모델에 구성된 역할 이름에 따라 데이터를 정렬할 수 있습니다.

RoleSorter는 아래와 같이 정렬 필터 프록시 모델에서 구성할 수 있습니다.

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

속성 설명

roleName : string

이 속성은 데이터 정렬에 사용될 역할 이름을 저장합니다.

기본값은 '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.