From 3e4d0ed66b2f8f3cf7b9af9f14af67c045b94682 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 26 Jun 2014 15:59:55 +0200 Subject: Add TextField/Area::inputMethodComposing In order for the Android style to be able to control the visibility of the text cursor handle as appropriate, it needs to know when the input method is composing ie. when the user is typing. Change-Id: If8e3ac66b63c938659a5d9044d75eafd348cd6a3 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/controls/TextArea.qml | 12 ++++++++++++ src/controls/TextField.qml | 12 ++++++++++++ 2 files changed, 24 insertions(+) (limited to 'src') diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml index ad121538a..aa02cb146 100644 --- a/src/controls/TextArea.qml +++ b/src/controls/TextArea.qml @@ -192,6 +192,18 @@ ScrollView { */ property alias verticalAlignment: edit.verticalAlignment + /*! + \qmlproperty bool TextArea::inputMethodComposing + \since QtQuick.Controls 1.3 + + This property holds whether the TextArea has partial text input from an input method. + + While it is composing an input method may rely on mouse or key events from the TextArea + to edit or commit the partial text. This property can be used to determine when to disable + events handlers that may interfere with the correct operation of an input method. + */ + readonly property bool inputMethodComposing: !!edit.inputMethodComposing + /*! \qmlproperty enumeration TextArea::inputMethodHints diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml index 1a8a3503d..f25b8195d 100644 --- a/src/controls/TextField.qml +++ b/src/controls/TextField.qml @@ -235,6 +235,18 @@ Control { */ property alias inputMask: textInput.inputMask + /*! + \qmlproperty bool TextField::inputMethodComposing + \since QtQuick.Controls 1.3 + + This property holds whether the TextField has partial text input from an input method. + + While it is composing an input method may rely on mouse or key events from the TextField + to edit or commit the partial text. This property can be used to determine when to disable + events handlers that may interfere with the correct operation of an input method. + */ + readonly property bool inputMethodComposing: !!textInput.inputMethodComposing + /*! \qmlproperty enumeration TextField::inputMethodHints -- cgit v1.2.3