이 페이지에서

ShadowStyle QML Type

델리게이트의 그림자 스타일을 정의합니다. 더 보기...

Import Statement: import Qt.labs.StyleKit

속성

상세 설명

ShadowStyle은 DelegateStyle 뒤에 그림자를 렌더링하기 위한 프로퍼티를 제공합니다. 모든 델리게이트에서 shadow 그룹화된 프로퍼티로 사용할 수 있습니다.

button {
    background {
        shadow {
            color: "lightgray"
            opacity: 0.6
            verticalOffset: 2
            horizontalOffset: 2
        }
    }
}

그림자는 스케일과 색상을 조정하여 광선 효과를 만드는 데도 사용할 수 있습니다. 다음 코드 조각은 Switch 핸들에 선택 시 강해지는 흰색 확산 광선을 추가합니다:

dark: Theme {
    applicationWindow.background.color: "#1e1e1e"
    switchControl {
        handle.color: "white"
        handle.shadow {
            color: "ghostwhite"
            scale: 1.2
            opacity: 0.6
        }
        checked.handle.shadow.scale: 1.5
    }
}

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

DelegateStyle, ControlStyle, ControlStateStyle, 및 대체 스타일 참조를참조하세요 .

속성 문서

blur : real

그림자의 흐림입니다. 0.0 값은 선명한 그림자를 생성하고, 값이 클수록 더 부드럽고 확산된 그림자를 생성합니다. 기본값은 10.0 입니다.

color : color

그림자의 색상입니다. 기본값은 transparent 이며, 이는 기본적으로 그림자가 그려지지 않음을 의미합니다.

visibleopacity참조하세요 .

delegate : Component

기본 그림자 렌더링을 대체하는 사용자 정의 QML Component. 설정하면 StyleKit 기본 그림자를 그리는 대신 이 컴포넌트를 인스턴스화합니다.

horizontalOffset : real

델리게이트에서 그림자의 수평 오프셋(픽셀 단위)입니다.

opacity : real

그림자의 불투명도를 0.0 (완전 투명)에서 1.0 (완전 불투명)까지 설정할 수 있습니다. 기본값은 1.0 입니다.

visiblecolor참조하세요 .

scale : real

델리게이트에 상대적인 그림자의 스케일 계수입니다. 기본값은 1.0 입니다.

verticalOffset : real

델리게이트에서 그림자의 수직 오프셋(픽셀 단위)입니다.

visible : bool

그림자가 표시되는지 여부입니다. 기본값은 true 입니다.

그러나 기본 그림자 colortransparent 이므로 다른 색상을 설정하지 않으면 그림자가 표시되지 않습니다.

opacity도 참조하세요 .

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