ValueFilter QML Type
SortFilterProxyModel 의 데이터를 역할 이름과 값을 기준으로 필터링합니다. 더 보기...
| Import Statement: | import QtQml.Models |
| Since: | Qt 6.10 |
| Inherits: | |
| Status: | Technology preview |
이 유형은 기술 미리보기 단계에 있으며 변경될 수 있습니다.
속성
- value : variant
상세 설명
ValueFilter를 사용하면 소스 모델에 구성된 대로 역할 이름이나 지정된 값, 또는 둘 모두를 기준으로 데이터를 필터링할 수 있습니다. 데이터 필터링에 사용되는 역할 이름은 모델 role name 을 기반으로 합니다. 역할 이름의 기본값은 "display" 입니다.
다음 코드 조각은 ValueFilter를 사용하여 소스 모델에서 역할 이름 "favorite" 의 값이 "true" 인 데이터만 포함하는 방법을 보여줍니다:
SortFilterProxyModel {
sourceModel: model
filters: [
ValueFilter {
roleName: "favorite"
value: true
}
]
}속성 설명서
value : variant
이 속성에는 데이터 필터링에 사용할 수 있는 특정 값이 저장됩니다.
© 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.