이 페이지에서

RangeFilter QML Type

SortFilterProxyModel 의 데이터를 필터링하여 역할 값이 지정된 범위 내에 속하는지 여부를 확인합니다. 더 보기...

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

RoleFilter

Status: Technology preview

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

속성

방법

상세 설명

RangeFilter는 구성된 역할의 값이 minimum 과 maximum 사이에 있는 행을 허용합니다. 두 경계값 모두 기본적으로 포함됩니다.

다음 예제는 CPU 사용량이 70에서 100 사이인 프로세스를 보여줍니다:

SortFilterProxyModel {
    sourceModel: processModel
    filters: [
        RangeFilter {
            roleName: "cpuUsage"
            minimum: 70
            maximum: 100
        }
    ]
}

경계값 자체를 제외해야 하는 경우 exclusive()을 사용합니다:

RangeFilter {
    roleName: "cpuUsage"
    minimum: exclusive(70)
    maximum: 100
}

속성 설명서

maximum : variant

범위의 상한값입니다. 역할 값이 이 값보다 큰 행은 제외됩니다. 설정하지 않으면 상한값이 없습니다.

단순한 값을 지정하면 상한이 포함되는 방식으로 처리됩니다. 즉, maximum 와 같은 행도 허용됩니다. 경계값 자체를 제외하려면 exclusive()를 사용하십시오.

minimum : variant

범위의 하한값입니다. 역할 값이 이 값보다 작은 행은 제외됩니다. 설정하지 않으면 하한값이 없습니다.

단순한 값을 지정하면 하한값이 포함되는 방식으로 적용됩니다. 즉, minimum 와 같은 값을 가진 행도 허용됩니다. 경계값 자체를 제외하려면 exclusive()를 사용하십시오.

메서드 문서

variant exclusive(value)

범위에서 ‘ value ’를 제외한 경계를 반환합니다. 역할 값이 ‘ value ’인 행은 거부됩니다.

RangeFilter {
    roleName: "score"
    minimum: 0
    maximum: RangeFilter.exclusive(100)

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