diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-10-09 18:04:51 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-10-09 18:04:51 +0200 |
commit | 9676488f7e8af1bab9752a4280d7fe6aa34a47ac (patch) | |
tree | d9a7b4097ce765685ffedf7f885396bb79e96b2c /src/controls/TextField.qml | |
parent | bb519a4001ae9ed1e780017ea8551c37c0098529 (diff) | |
parent | c36f219faaa2a1b89ac19d0822200b163c22eec0 (diff) | |
download | qtquickcontrols-9676488f7e8af1bab9752a4280d7fe6aa34a47ac.tar.gz |
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: Icc27c3f8638601b43daac37ce4a6d9678476996a
Diffstat (limited to 'src/controls/TextField.qml')
-rw-r--r-- | src/controls/TextField.qml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml index 5c602ee4..2e940bdb 100644 --- a/src/controls/TextField.qml +++ b/src/controls/TextField.qml @@ -282,6 +282,7 @@ Control { \li Qt.ImhDate - The text editor functions as a date field. \li Qt.ImhTime - The text editor functions as a time field. + \li Qt.ImhMultiLine - The text editor doesn't close software input keyboard when Return or Enter key is pressed (since QtQuick.Controls 1.3). \endlist Flags that restrict input (exclusive flags) are: @@ -301,7 +302,7 @@ Control { \li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used. \endlist */ - property int inputMethodHints: textInput.inputMethodHints || Qt.ImhNone + property alias inputMethodHints: textInput.inputMethodHints /*! \qmlproperty int TextField::length @@ -434,6 +435,15 @@ Control { property alias validator: textInput.validator /*! + \since QtQuick.Controls 1.3 + + This property contains the edit \l Menu for working + with text selection. Set it to \c null if no menu + is wanted. + */ + property Component menu: textInput.editMenu.defaultMenu + + /*! \qmlsignal TextField::accepted() This signal is emitted when the Return or Enter key is pressed. @@ -654,7 +664,8 @@ Control { onAccepted: { Qt.inputMethod.commit() - Qt.inputMethod.hide() + if (!(textInput.inputMethodHints & Qt.ImhMultiLine)) + Qt.inputMethod.hide() textfield.accepted() } |