ValueFilter QML Type

역할 이름 및 값을 기준으로 SortFilterProxyModel 의 데이터를 필터링합니다. 더 보기...

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

RoleFilter

Status: Preliminary

이 유형은 개발 중이며 변경될 수 있습니다.

속성

상세 설명

ValueFilter를 사용하면 소스 모델에 구성된 대로 역할 이름이나 지정된 값 또는 둘 다에 따라 데이터를 필터링할 수 있습니다. 데이터를 필터링하는 데 사용되는 역할 이름은 role name 모델을 기반으로 합니다. 역할 이름의 기본값은 "display" 입니다.

"true"다음 코드 조각은 역할 이름 값이 "favorite" 인 소스 모델의 데이터만 포함하기 위해 ValueFilter를 사용하는 방법을 보여줍니다:

SortFilterProxyModel {
    model: sourceModel
    filters: [
        ValueFilter {
            roleName: "favorite"
            value: true
        }
    ]
}

속성 문서

value : string

이 속성은 데이터를 필터링하는 데 사용할 수 있는 특정 값을 보유합니다.

기본값은 빈 문자열입니다.


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