Provides access to the Qt palettes 更多...
import 语句: | import QtQuick 2.7 |
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
,和
Disabled
。见
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 } }
另请参阅 QPalette .
The alternate base color of the current color group.
另请参阅 QPalette::ColorRole .
The base color of the current color group.
另请参阅 QPalette::ColorRole .
The button color of the current color group.
另请参阅 QPalette::ColorRole .
The button text foreground color of the current color group.
另请参阅 QPalette::ColorRole .
The color group of the palette. This can be one of:
另请参阅 QPalette::ColorGroup .
The dark color of the current color group.
另请参阅 QPalette::ColorRole .
The highlight color of the current color group.
另请参阅 QPalette::ColorRole .
The highlighted text color of the current color group.
另请参阅 QPalette::ColorRole .
The light color of the current color group.
另请参阅 QPalette::ColorRole .
The mid color of the current color group.
另请参阅 QPalette::ColorRole .
The midlight color of the current color group.
另请参阅 QPalette::ColorRole .
The shadow color of the current color group.
另请参阅 QPalette::ColorRole .
The text color of the current color group.
另请参阅 QPalette::ColorRole .
The window (general background) color of the current color group.
另请参阅 QPalette::ColorRole .
The window text (general foreground) color of the current color group.
另请参阅 QPalette::ColorRole .