SystemPalette QML Type▲
-
Import Statement: import QtQuick
-
Group: SystemPalette is part of qtquick-visual-utility
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 2.0
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▲
See also QPalette
Property Documentation▲
[read-only] alternateBase : color▲
[read-only] base : color▲
[read-only] button : color▲
See Also▲
See also QPalette::ColorRole
[read-only] buttonText : color▲
See Also▲
See also QPalette::ColorRole
colorGroup : enumeration▲
The color group of the palette. This can be one of:
-
SystemPalette.Active (default)
-
SystemPalette.Inactive
-
SystemPalette.Disabled
See Also▲
See also QPalette::ColorGroup
[read-only] dark : color▲
[read-only] highlight : color▲
[read-only] highlightedText : color▲
[read-only] light : color▲
[read-only] mid : color▲
[read-only] midlight : color▲
[read-only, since 6.2] placeholderText : color▲
The placeholder text color of the current color group.
This property was introduced in Qt 6.2.
See Also▲
See also QPalette::ColorRole
[read-only] shadow : color▲
[read-only] text : color▲
[read-only] window : color▲
The window (general background) color of the current color group.
See Also▲
See also QPalette::ColorRole
[read-only] windowText : color▲
The window text (general foreground) color of the current color group.
See Also▲
See also QPalette::ColorRole