aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickmenuitem.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-06-06 15:58:36 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-06-07 09:56:27 +0000
commit0d59bff8929299ce5e2d9ec957055854a59c6cd6 (patch)
tree34e0c56e2af911bab3e5098e022af2d79d6eae8b /src/quicktemplates2/qquickmenuitem.cpp
parentf37397ba3125e1ab5dc940270d90844a6010224f (diff)
QQuickMenu: update the highlighted item on mouse hover
This is the expected behavior on desktop. NOTE: It must be possible to mix mouse hover highlighting, and keyboard navigation in the way that keyboard navigation must seamlessly continue from the item that was previously mouse highlighted. Furthermore, there should be only one item highlighted at a time. In order to be able to respect keyboard navigation while another item is hovered and vice versa, the visual highlight should be bound to MenuItem::highlighted instead of Control::activeFocus or Control::hovered. [ChangeLog][Controls][MenuItem] Menu has been fixed to highlight its items while key navigating and mouse hovering to ensure seamless item highlight between mouse hover and key navigation. In order to provide appropriate highlighting that works for key navigation and mouse hover, styles should bind their visual highlight to MenuItem::highlighted instead of Control::activeFocus or Control::hovered. Change-Id: I70cad5a5b441f2616d1ce2166e97974dc1ae063f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickmenuitem.cpp')
-rw-r--r--src/quicktemplates2/qquickmenuitem.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquickmenuitem.cpp b/src/quicktemplates2/qquickmenuitem.cpp
index e792f8bf..3ef03caf 100644
--- a/src/quicktemplates2/qquickmenuitem.cpp
+++ b/src/quicktemplates2/qquickmenuitem.cpp
@@ -118,10 +118,9 @@ QQuickMenuItem::QQuickMenuItem(QQuickItem *parent)
/*!
\qmlproperty bool QtQuick.Controls::MenuItem::highlighted
- This property holds whether the menu item is highlighted.
+ This property holds whether the menu item is highlighted by the user.
- A menu item can be highlighted in order to draw the user's attention
- towards it. It has no effect on keyboard interaction.
+ A menu item can be highlighted by mouse hover or keyboard navigation.
The default value is \c false.
*/