SystemPalette QML Type

Ermöglicht den Zugriff auf die Qt-Paletten. Mehr...

Import Statement: import QtQuick

Eigenschaften

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 [read-only, since 6.7]

Die Akzentfarbe der aktuellen Farbgruppe.

Diese Eigenschaft wurde in Qt 6.7 eingeführt.

Siehe auch QPalette::ColorRole.


alternateBase : color [read-only]

Die alternative Grundfarbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


base : color [read-only]

Die Grundfarbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


button : color [read-only]

Die Farbe der Schaltfläche der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


buttonText : color [read-only]

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:

KonstanteBeschreibung
SystemPalette.Active(Voreinstellung) QPalette::Active
SystemPalette.InactiveQPalette::Inactive
SystemPalette.DisabledQPalette::Disabled

Siehe auch QPalette::ColorGroup.


dark : color [read-only]

Die dunkle Farbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


highlight : color [read-only]

Die Hervorhebungsfarbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


highlightedText : color [read-only]

Die hervorgehobene Textfarbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


light : color [read-only]

Die Lichtfarbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


mid : color [read-only]

Die mittlere Farbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


midlight : color [read-only]

Die mittlere Lichtfarbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


placeholderText : color [read-only, since 6.2]

Die Platzhalter-Textfarbe der aktuellen Farbgruppe.

Diese Eigenschaft wurde in Qt 6.2 eingeführt.

Siehe auch QPalette::ColorRole.


shadow : color [read-only]

Die Schattenfarbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


text : color [read-only]

Die Textfarbe der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


window : color [read-only]

Die Fensterfarbe (allgemeiner Hintergrund) der aktuellen Farbgruppe.

Siehe auch QPalette::ColorRole.


windowText : color [read-only]

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.