diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-06-15 00:16:57 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-06-21 12:14:31 +0000 |
commit | 1ffede10a0b2d2f0dc64fcce4f54263d9d30e57e (patch) | |
tree | ceb41443e1aab54322ba8afa90d3e85796c3276b /src/quicktemplates2/qquickmenuitem.cpp | |
parent | 39b4ac1e79415e8da2545a9a9002a9d674da77a1 (diff) |
Add Menu::currentIndex
De-couple current index management from the content item. Instead of
manipulating the content item's current index directly from C++, offer
a currentIndex property that can be visualized by the style, also when
not using a ListView. This is essentially the same technique ComboBox
uses to control the highlighted index in the popup ListView.
[ChangeLog][Controls][Menu] Added currentIndex property for styling
purposes.
Change-Id: Idf7746d9c08fc9ca9a0dfd15225ebae5a29243c9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickmenuitem.cpp')
-rw-r--r-- | src/quicktemplates2/qquickmenuitem.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickmenuitem.cpp b/src/quicktemplates2/qquickmenuitem.cpp index 69a2b73b..446d12d2 100644 --- a/src/quicktemplates2/qquickmenuitem.cpp +++ b/src/quicktemplates2/qquickmenuitem.cpp @@ -144,6 +144,8 @@ QQuickMenuItem::QQuickMenuItem(QQuickItem *parent) A menu item can be highlighted by mouse hover or keyboard navigation. The default value is \c false. + + \sa Menu::currentIndex */ bool QQuickMenuItem::isHighlighted() const { |