aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquicksystempalette.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquicksystempalette.cpp')
-rw-r--r--src/quick/util/qquicksystempalette.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/quick/util/qquicksystempalette.cpp b/src/quick/util/qquicksystempalette.cpp
index 7271537ec7..46b2fc00ba 100644
--- a/src/quick/util/qquicksystempalette.cpp
+++ b/src/quick/util/qquicksystempalette.cpp
@@ -27,8 +27,8 @@ public:
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 \e {color groups}: \c Active, \c Inactive,
- and \c Disabled. See the QPalette documentation for details about
+ are grouped into three \e {color groups}: \c active, \c inactive,
+ and \c 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
@@ -230,16 +230,28 @@ QColor QQuickSystemPalette::placeholderText() const
Q_D(const QQuickSystemPalette);
return QGuiApplication::palette().color(d->group, QPalette::PlaceholderText);
}
+
+/*!
+ \qmlproperty color QtQuick::SystemPalette::accent
+ The accent color of the current color group.
+
+ \since 6.7
+ \sa QPalette::ColorRole
+*/
+QColor QQuickSystemPalette::accent() const
+{
+ Q_D(const QQuickSystemPalette);
+ return QGuiApplication::palette().color(d->group, QPalette::Accent);
+}
+
/*!
\qmlproperty enumeration QtQuick::SystemPalette::colorGroup
The color group of the palette. This can be one of:
- \list
- \li SystemPalette.Active (default)
- \li SystemPalette.Inactive
- \li SystemPalette.Disabled
- \endlist
+ \value SystemPalette.Active (default) QPalette::Active
+ \value SystemPalette.Inactive QPalette::Inactive
+ \value SystemPalette.Disabled QPalette::Disabled
\sa QPalette::ColorGroup
*/