ColorDialog QML Type
색상 대화 상자. 더 보기...
Import Statement: | import QtQuick.Dialogs |
Since: | Qt 6.4 |
Inherits: |
속성
- options : flags
- selectedColor : color
상세 설명
ColorDialog 유형은 색상 대화 상자를 위한 QML API를 제공합니다.
색상 대화 상자를 표시하려면 ColorDialog의 인스턴스를 구성하고 원하는 속성을 설정한 다음 open()를 호출합니다. selectedColor 속성은 대화 상자에서 처음에 선택한 색상을 결정하는 데 사용할 수 있습니다.
MenuItem { text: qsTr("Color") onTriggered: colorDialog.open() } ColorDialog { id: colorDialog selectedColor: document.color onAccepted: document.color = selectedColor } MyDocument { id: document }
가용성
기본 플랫폼 색상 대화 상자는 현재 다음 플랫폼에서 사용할 수 있습니다:
- iOS
- Linux(GTK+ 플랫폼 테마로 실행하는 경우)
- macOS
Qt Quick Dialogs 는 기본 구현을 사용할 수 없는 플랫폼에서 Qt Quick 구현을 폴백으로 사용합니다.
속성 문서
options : flags |
이 속성에는 대화 상자의 모양과 느낌에 영향을 주는 다양한 옵션이 있습니다.
기본적으로 모든 옵션은 비활성화되어 있습니다.
옵션은 대화 상자를 표시하기 전에 설정해야 합니다. 대화 상자가 표시된 상태에서 설정해도 옵션 및 플랫폼에 따라 대화 상자에 즉각적인 영향을 미치지는 않습니다.
사용 가능한 옵션
상수 | 설명 |
---|---|
ColorDialog.ShowAlphaChannel | 알파 값에 대한 슬라이더와 추가 입력 필드를 표시합니다. |
ColorDialog.NoButtons | Open 및 Cancel 버튼을 표시하지 않습니다('실시간 대화 상자'에 유용). |
ColorDialog.NoEyeDropperButton | Eye Dropper 버튼을 표시하지 않습니다. 이 값은 Qt 6.6에 추가되었습니다. |
ColorDialog.DontUseNativeDialog | 대화 상자가 기본이 아닌 빠른 구현을 사용하도록 강제합니다. |
selectedColor : color |
© 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.