diff options
Diffstat (limited to 'src/quick/items/qquickcolorgroup.cpp')
-rw-r--r-- | src/quick/items/qquickcolorgroup.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/quick/items/qquickcolorgroup.cpp b/src/quick/items/qquickcolorgroup.cpp index fd913aba7a..bc1b4dee5a 100644 --- a/src/quick/items/qquickcolorgroup.cpp +++ b/src/quick/items/qquickcolorgroup.cpp @@ -45,9 +45,21 @@ QT_BEGIN_NAMESPACE base: "green" } \endcode + + The \l Palette type exposes color groups for each QML item state. */ /*! + \qmlproperty color QtQuick::ColorGroup::accent + \since 6.6 + + A color that typically contrasts or compliments \l base, \l window, and \l + button colors. It usually represents the users' choice of desktop + personalisation. Styling of interactive components is a typical use case. + Unless explicitly set, it defaults to \l highlight. +*/ + +/*! \qmlproperty color QtQuick::ColorGroup::alternateBase Used as the alternate background color in item views with alternating row colors. @@ -180,8 +192,6 @@ QT_BEGIN_NAMESPACE Additional signal indicates that the current state of this color group has been changed. Usually it means that one of the colors is changed. - - \sa Palette */ /*! @@ -499,6 +509,21 @@ void QQuickColorGroup::resetPlaceholderText() resetColor(QPalette::PlaceholderText, &QQuickColorGroup::placeholderTextChanged); } +QColor QQuickColorGroup::accent() const +{ + return color(QPalette::Accent); +} + +void QQuickColorGroup::setAccent(const QColor &color) +{ + setColor(QPalette::Accent, color, &QQuickColorGroup::accentChanged); +} + +void QQuickColorGroup::resetAccent() +{ + resetColor(QPalette::Accent, &QQuickColorGroup::accentChanged); +} + QPalette::ColorGroup QQuickColorGroup::groupTag() const { return m_groupTag; |