- Qt 6.10
- Qt Quick
- QML Types
- SystemPalette
- Qt 6.10.1 Reference Documentation

# SystemPalette QML Type

Provides access to the Qt palettes. More...

Import Statement: | `import QtQuick`

- List of all members, including inherited members

## Properties

- accent : color `(since 6.7)`
- alternateBase : color
- base : color
- button : color
- buttonText : color
- colorGroup : enumeration
- dark : color
- highlight : color
- highlightedText : color
- light : color
- mid : color
- midlight : color
- placeholderText : color `(since 6.2)`
- shadow : color
- text : color
- window : color
- windowText : color

## Detailed Description

The SystemPalette type provides access to the Qt application palettes. This provides information about the standard colors used for application windows, buttons and other features. These colors are grouped into three color groups: `active`, `inactive`, and `disabled`. See the QPalette documentation for details about color groups and the properties provided by SystemPalette.

This can be used to color items in a way that provides a more native look and feel.

The following example creates a palette from the `Active` color group and uses this to color the window and text items appropriately:

     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
         }
     }

See also QPalette.

## Property Documentation

accent : color `[read-only, since 6.7]`

The accent color of the current color group.

This property was introduced in Qt 6.7.

See also QPalette::ColorRole.

alternateBase : color `[read-only]`

The alternate base color of the current color group.

See also QPalette::ColorRole.

base : color `[read-only]`

The base color of the current color group.

See also QPalette::ColorRole.

button : color `[read-only]`

The button color of the current color group.

See also QPalette::ColorRole.

buttonText : color `[read-only]`

The button text foreground color of the current color group.

See also QPalette::ColorRole.

colorGroup : enumeration

The color group of the palette. This can be one of:

Constant | Description
--- | ---
`SystemPalette.Active` | (default) QPalette::Active
`SystemPalette.Inactive` | QPalette::Inactive
`SystemPalette.Disabled` | QPalette::Disabled

See also QPalette::ColorGroup.

dark : color `[read-only]`

The dark color of the current color group.

See also QPalette::ColorRole.

highlight : color `[read-only]`

The highlight color of the current color group.

See also QPalette::ColorRole.

highlightedText : color `[read-only]`

The highlighted text color of the current color group.

See also QPalette::ColorRole.

light : color `[read-only]`

The light color of the current color group.

See also QPalette::ColorRole.

mid : color `[read-only]`

The mid color of the current color group.

See also QPalette::ColorRole.

midlight : color `[read-only]`

The midlight color of the current color group.

See also QPalette::ColorRole.

placeholderText : color `[read-only, since 6.2]`

The placeholder text color of the current color group.

This property was introduced in Qt 6.2.

See also QPalette::ColorRole.

shadow : color `[read-only]`

The shadow color of the current color group.

See also QPalette::ColorRole.

text : color `[read-only]`

The text color of the current color group.

See also QPalette::ColorRole.

window : color `[read-only]`

The window (general background) color of the current color group.

See also QPalette::ColorRole.

windowText : color `[read-only]`

The window text (general foreground) color of the current color group.

See also QPalette::ColorRole.