diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-10-01 21:09:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-01 12:25:04 +0100 |
commit | a7415035ed375d31e0e6d503ea8af43bf98d3fb7 (patch) | |
tree | d4dbc5212a855805c0967fca77aa06d4d515fedf /src/quick/items/qquickitem.cpp | |
parent | 5b05a78d0055757adb3b2703ea990e07dbcd145a (diff) |
KeyNavigation should use forceActiveFocus
It would only set focus which works fine as long as the target is in the
same FocusScope. But as user one would expect that the target actually
receives the focus. Using forceActiveFocus is sensible since the current
item needs to have the "activeFocus" anyway and within the same focus
scope setting focus=true on another item will take away the active
focus.
Task-number: QTBUG-34209
Change-Id: I824f15fd0d4d42eb2f0c6c1b02660f2e007b3362
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index cd526a0dae..55ba25c63f 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -732,7 +732,7 @@ void QQuickKeyNavigationAttached::setFocusNavigation(QQuickItem *currentItem, co do { isNextItem = false; if (currentItem->isVisible() && currentItem->isEnabled()) { - currentItem->setFocus(true); + currentItem->forceActiveFocus(Qt::OtherFocusReason); } else { QObject *attached = qmlAttachedPropertiesObject<QQuickKeyNavigationAttached>(currentItem, false); |