このページでは

SystemPalette QML Type

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

Import Statement: import QtQuick

プロパティ

詳細説明

SystemPalette 型は Qt アプリケーションパレットへのアクセスを提供します。これは、アプリケーションのウィンドウやボタン、その他の機能で使用される標準的な色に関する情報を提供します。これらの色は3つのカラーグループにグループ化されています:active inactivedisabled です。カラーグループと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.