이 페이지에서

IndicatorStyle QML Type

컨트롤의 표시기 스타일을 정의합니다. 더 보기...

Import Statement: import Qt.labs.StyleKit
Inherits:

DelegateStyle

속성

상세 설명

인디케이터 스타일은 인디케이터 스타일 지정과 관련된 프로퍼티로 DelegateStyle 을 확장합니다.

인디케이터스타일 자체는 인디케이터 배경을 설명하고 foreground 은 그 안에 그려진 콘텐츠를 설명합니다. 예를 들어 checkBox.indicator 은 체크 박스 프레임의 스타일을 지정하고 checkBox.indicator.foreground 은 체크 표시의 스타일을 지정합니다. switchControl , sliderprogressBar 의 경우 표시기는 홈의 스타일을 지정하고 전경은 채우기의 스타일을 지정합니다.

checkBox {
    background.visible: false
    text.alignment: Qt.AlignVCenter | Qt.AlignLeft
    indicator {
        color: "transparent"
        border.width: 1
        foreground {
            color: "transparent"
            image.source: "qrc:/qt-project.org/imports/QtQuick/Controls/Basic/images/check.png"
            // Hide the checkMark when the CheckBox is unchecked
            visible: false
        }
    }
    checked {
        // Show the checkMark when the CheckBox is checked
        indicator.foreground.visible: true
    }
}

일부 컨트롤에는 표시기가 두 개 이상 있습니다. 예를 들어 SpinBox 에는 증가 버튼과 감소 버튼이 모두 있습니다. 이들은 updown 하위 표시기, spinBox.indicator.upspinBox.indicator.down 를 사용하여 독립적으로 스타일을 지정할 수 있습니다. 하위 표시기에 설정되지 않은 속성은 표시기 자체로 돌아갑니다.

spinBox {
    text.alignment: Qt.AlignHCenter | Qt.AlignVCenter
    padding: 0
    indicator {
        implicitHeight: Style.Stretch
        color: "navy"
        opacity: 0.1
        foreground {
            color: "transparent"
            margins: 10
            image.color: "navy"
            image.fillMode: Image.PreserveAspectFit
            image.source: "qrc:/qt-project.org/imports/QtQuick/Controls/Basic/images/arrow-indicator.png"
            implicitWidth: 10
            implicitHeight: 10
            alignment: Qt.AlignCenter
        }
        down {
            alignment: Qt.AlignLeft
            foreground.rotation: 90
        }
        up {
            alignment: Qt.AlignRight
            foreground.rotation: -90
        }
    }
}

참고: Qt.labs 모듈의 유형은 향후 버전에서 호환성을 보장하지 않습니다.

SubIndicatorStyle, DelegateStyle, ControlStyle, ControlStateStyle, 및 대체 스타일 참조를참조하십시오 .

속성 문서

down : SubIndicatorStyle

아래로(감소) 하위 표시기의 스타일을 지정하기 위한 그룹화된 속성입니다. SpinBox 와 같은 컨트롤에서 사용됩니다. 설정되지 않은 속성은 표시기 자체로 돌아갑니다.

up참조하세요 .

foreground : DelegateStyle

이 표시기의 전경 요소 스타일을 지정하기 위한 그룹화된 속성입니다. 예를 들어 checkBox.indicator 은 체크 박스 프레임을 나타내고 checkBox.indicator.foreground 은 체크 표시를 나타냅니다.

slider, progressBar, switchControl 와 같은 컨트롤의 경우 indicator.foreground 은 진행률 트랙 또는 홈 내 채우기를 나타내고 indicator 은 홈 자체를 나타냅니다.

up : SubIndicatorStyle

위로(증분) 하위 표시기의 스타일을 지정하기 위한 그룹화된 속성입니다. SpinBox 와 같은 컨트롤에서 사용됩니다. 설정되지 않은 속성은 인디케이터 자체로 돌아갑니다.

down참조하세요 .

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