このページでは

SystemPalette QML Type

Qt パレットへのアクセスを提供します。詳細...

Import Statement: import QtQuick

プロパティ

詳細説明

SystemPalette 型は Qt アプリケーションパレットへのアクセスを提供します。これは、アプリケーションのウィンドウやボタン、その他の機能で使用される標準的な色に関する情報を提供します。これらの色は3つのカラーグループにグループ化されています:active inactive とdisabled です。カラーグループとSystemPaletteが提供するプロパティの詳細については、QPalette のドキュメントを参照してください。

これは、よりネイティブなルック&フィールを提供する方法でアイテムを着色するために使用することができます。

次の例では、Active カラー・グループからパレットを作成し、これを使用してウィンドウとテキスト・アイテムを適切に着色しています:

import QtQuick

Rectangle {
    SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }

    width: 640; height: 480
    color: myPalette.window

    Text {
        anchors.fill: parent
        text: "Hello!"; color: myPalette.windowText
    }
}

QPaletteも参照してください 。

プロパティ文書

accent : color [read-only, since 6.7]

現在のカラーグループのアクセントカラー。

このプロパティは Qt 6.7 で導入されました。

QPalette::ColorRoleも参照して ください。


alternateBase : color [read-only]

現在のカラーグループの代替ベースカラー。

QPalette::ColorRoleも参照して ください。


base : color [read-only]

現在のカラーグループのベースカラー。

QPalette::ColorRole も参照して ください。


button : color [read-only]

現在の色グループのボタン色。

QPalette::ColorRoleも参照 。


buttonText : color [read-only]

現在の色グループのボタンテキスト前景色。

QPalette::ColorRoleも参照 。


colorGroup : enumeration

パレットの色グループ。以下のいずれかを指定します:

定数説明
SystemPalette.Active(デフォルト)QPalette::Active
SystemPalette.InactiveQPalette::Inactive
SystemPalette.DisabledQPalette::Disabled

QPalette::ColorGroupも参照してください 。


dark : color [read-only]

現在の色グループの暗い色。

QPalette::ColorRoleも参照 。


highlight : color [read-only]

カ レ ン ト 色グループのハ イ ラ イ ト 色。

QPalette::ColorRoleも参照 。


highlightedText : color [read-only]

現在の色グループの強調テキス ト 色。

QPalette::ColorRoleも参照 。


light : color [read-only]

現在の色グループのライト色。

QPalette::ColorRoleも参照 。


mid : color [read-only]

現在の色グループの中間色。

QPalette::ColorRoleも参照 。


midlight : color [read-only]

現在の色グループの中間色。

QPalette::ColorRoleも参照 。


placeholderText : color [read-only, since 6.2]

現在のカラーグループのプレースホルダ・テキスト色。

このプロパティは Qt 6.2 で導入されました。

QPalette::ColorRole も参照して ください。


shadow : color [read-only]

現在のカラーグループの影の色。

QPalette::ColorRoleも参照して ください。


text : color [read-only]

現在のカラーグループのテキスト色。

QPalette::ColorRoleも参照して ください。


window : color [read-only]

現在の色グループのウ ィ ン ド ウ (背景全般) 色。

QPalette::ColorRoleも 参照 。


windowText : color [read-only]

現在の色グループのウ ィ ン ド ウ テキス ト (一般的な前景) 色。

QPalette::ColorRoleも参照 。


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