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 ダイアログは、ネイティブな実装が利用できないプラットフォームでは、フォールバックとして の実装を使用します。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.