The SystemPalette element provides access to the Qt palettes. More...
This element was introduced in Qt 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.
read-onlyalternateBase : color |
The alternate base color of the current color group.
See also QPalette::ColorRole.
read-onlybase : color |
The base color of the current color group.
See also QPalette::ColorRole.
read-onlybutton : color |
The button color of the current color group.
See also QPalette::ColorRole.
read-onlybuttonText : color |
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:
See also QPalette::ColorGroup.
read-onlydark : color |
The dark color of the current color group.
See also QPalette::ColorRole.
read-onlyhighlight : color |
The highlight color of the current color group.
See also QPalette::ColorRole.
read-onlyhighlightedText : color |
The highlighted text color of the current color group.
See also QPalette::ColorRole.
read-onlylight : color |
The light color of the current color group.
See also QPalette::ColorRole.
read-onlymid : color |
The mid color of the current color group.
See also QPalette::ColorRole.
read-onlymidlight : color |
The midlight color of the current color group.
See also QPalette::ColorRole.
read-onlyshadow : color |
The shadow color of the current color group.
See also QPalette::ColorRole.
read-onlytext : color |
The text color of the current color group.
See also QPalette::ColorRole.
read-onlywindow : color |
The window (general background) color of the current color group.
See also QPalette::ColorRole.
read-onlywindowText : color |
The window text (general foreground) color of the current color group.
See also QPalette::ColorRole.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.