Provides access to the Qt palettes. 更多...
import 语句: | import QtQuick |
(从 6.7 起)
(从 6.2 起)
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
,和
被禁用
。见
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 } }
另请参阅 QPalette .
accent
:
color
|
The accent color of the current color group.
This property was introduced in Qt 6.7.
另请参阅 QPalette::ColorRole .
alternateBase
:
color
|
The alternate base color of the current color group.
另请参阅 QPalette::ColorRole .
base
:
color
|
The base color of the current color group.
另请参阅 QPalette::ColorRole .
button
:
color
|
The button color of the current color group.
另请参阅 QPalette::ColorRole .
buttonText
:
color
|
The button text foreground color of the current color group.
另请参阅 QPalette::ColorRole .
colorGroup : enumeration |
The color group of the palette. This can be one of:
常量 | 描述 |
---|---|
SystemPalette.Active
|
(默认) QPalette::Active |
SystemPalette.Inactive
|
QPalette::Inactive |
SystemPalette.Disabled
|
QPalette::Disabled |
另请参阅 QPalette::ColorGroup .
dark
:
color
|
The dark color of the current color group.
另请参阅 QPalette::ColorRole .
highlight
:
color
|
The highlight color of the current color group.
另请参阅 QPalette::ColorRole .
highlightedText
:
color
|
The highlighted text color of the current color group.
另请参阅 QPalette::ColorRole .
light
:
color
|
The light color of the current color group.
另请参阅 QPalette::ColorRole .
mid
:
color
|
The mid color of the current color group.
另请参阅 QPalette::ColorRole .
midlight
:
color
|
The midlight color of the current color group.
另请参阅 QPalette::ColorRole .
placeholderText
:
color
|
The placeholder text color of the current color group.
该特性在 Qt 6.2 引入。
另请参阅 QPalette::ColorRole .
shadow
:
color
|
The shadow color of the current color group.
另请参阅 QPalette::ColorRole .
text
:
color
|
The text color of the current color group.
另请参阅 QPalette::ColorRole .
window
:
color
|
The window (general background) color of the current color group.
另请参阅 QPalette::ColorRole .
windowText
:
color
|
The window text (general foreground) color of the current color group.
另请参阅 QPalette::ColorRole .