Commit f82e2df5 authored by Richard Moe Gustavsen's avatar Richard Moe Gustavsen Committed by The Qt Project
Browse files

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: default avatarPaul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: default avatarShawn Rutledge <shawn.rutledge@digia.com>
parent 51a2943c
No related merge requests found
Showing with 6 additions and 0 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment