aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-10-30 13:19:42 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-01 17:53:07 +0100
commitf82e2df554f3d66f88e0b6c8c02b1efe894248cb (patch)
tree4808663fdc95610332771ef285aa495498c90760 /src/quick/items/qquickwindow_p.h
parent51a2943c018cc435cd840b7f8b6f3b1bff3c96e8 (diff)
QQuickWindowPrivate: implement clearFocusObject
Ref change: cfa85c7 (qtbase) Implement QQuickWindowPrivate::clearFocus() to enable platform plugins to remove focus from the focus object when the virtual keyboard closes. On mobile platforms line edits etc are not supposed to be drawn with focus and blinking cursors unless the virtual keyboard (or another keyboard) is open. With the new virtual QWindowPrivate::clearFocus() the platforms can remove focus without deactivating the whole window. The old implementation on iOS deactivated the whole window when the keyboard was closed. But this was unfortunate, especially in QtQuick, since a qquicktextinput would not get active focus unless the window was active. But the platform would not activate the window unless the keybaord was open. So, a classic chicken - egg problem. Change-Id: I62e652a3cd85f1313713c5d086d9537cc2f9826f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/quick/items/qquickwindow_p.h')
-rw-r--r--src/quick/items/qquickwindow_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index 2cf98bfe21..c23745b5f1 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -166,6 +166,7 @@ public:
void setFocusInScope(QQuickItem *scope, QQuickItem *item, Qt::FocusReason reason, FocusOptions = 0);
void clearFocusInScope(QQuickItem *scope, QQuickItem *item, Qt::FocusReason reason, FocusOptions = 0);
static void notifyFocusChangesRecur(QQuickItem **item, int remaining);
+ void clearFocusObject();
void updateFocusItemTransform();