SystemPalette QML Type
Ermöglicht den Zugriff auf die Qt-Paletten. Mehr...
Import Statement: | import QtQuick |
Eigenschaften
- accent : color
(since 6.7)
- alternateBase : color
- base : color
- button : color
- buttonText : color
- colorGroup : enumeration
- dark : color
- highlight : color
- highlightedText : color
- light : color
- mid : color
- midlight : color
- placeholderText : color
(since 6.2)
- shadow : color
- text : color
- window : color
- windowText : color
Detaillierte Beschreibung
Der Typ SystemPalette ermöglicht den Zugriff auf die Qt-Anwendungspaletten. Diese liefert Informationen über die Standardfarben, die für Anwendungsfenster, Schaltflächen und andere Funktionen verwendet werden. Diese Farben sind in drei Farbgruppen gruppiert: active
, inactive
, und disabled
. Einzelheiten zu den Farbgruppen und den von der Systempalette bereitgestellten Eigenschaften finden Sie in der Dokumentation QPalette.
Damit können Sie Elemente so einfärben, dass sie ein natives Aussehen erhalten.
Das folgende Beispiel erstellt eine Palette aus der Farbgruppe Active
und verwendet diese, um das Fenster und die Textelemente entsprechend einzufärben:
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 } }
Siehe auch QPalette.
Eigenschaft Dokumentation
accent : color |
Die Akzentfarbe der aktuellen Farbgruppe.
Diese Eigenschaft wurde in Qt 6.7 eingeführt.
Siehe auch QPalette::ColorRole.
alternateBase : color |
Die alternative Grundfarbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
base : color |
Die Grundfarbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
button : color |
Die Farbe der Schaltfläche der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
buttonText : color |
Die Vordergrundfarbe des Schaltflächentextes in der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
colorGroup : enumeration |
Die Farbgruppe der Palette. Dies kann eine der folgenden sein:
Konstante | Beschreibung |
---|---|
SystemPalette.Active | (Voreinstellung) QPalette::Active |
SystemPalette.Inactive | QPalette::Inactive |
SystemPalette.Disabled | QPalette::Disabled |
Siehe auch QPalette::ColorGroup.
dark : color |
Die dunkle Farbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
highlight : color |
Die Hervorhebungsfarbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
highlightedText : color |
Die hervorgehobene Textfarbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
light : color |
Die Lichtfarbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
mid : color |
Die mittlere Farbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
midlight : color |
Die mittlere Lichtfarbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
placeholderText : color |
Die Platzhalter-Textfarbe der aktuellen Farbgruppe.
Diese Eigenschaft wurde in Qt 6.2 eingeführt.
Siehe auch QPalette::ColorRole.
shadow : color |
Die Schattenfarbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
text : color |
Die Textfarbe der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
window : color |
Die Fensterfarbe (allgemeiner Hintergrund) der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
windowText : color |
Die Fenstertextfarbe (allgemeiner Vordergrund) der aktuellen Farbgruppe.
Siehe auch QPalette::ColorRole.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.