Qt 4.8
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
SystemPalette Class Reference

The SystemPalette element provides access to the Qt palettes. More...

Detailed Description

The SystemPalette element provides access to the Qt palettes.

Since
4.7

The SystemPalette element 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 1.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
QPalette

The documentation for this class was generated from the following file: