summaryrefslogtreecommitdiffstats
path: root/src/controls/TextField.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-16 13:47:50 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-16 13:48:15 +0100
commit7497dc48e674ee155aeebf0986be5a929ce15877 (patch)
tree87f575b7ce612b7130b91fd4c9b4e3dc437ff612 /src/controls/TextField.qml
parent46d983e08cdece92a62833dc74f37e2f11a66324 (diff)
parent5abfd7c00bc7ebfec2f059adc9bc22eb989ae10d (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: .qmake.conf tests/auto/controls/data/tst_stackview.qml Change-Id: I54b55d51452e812315f97bcdfd1a8e361a427f56
Diffstat (limited to 'src/controls/TextField.qml')
-rw-r--r--src/controls/TextField.qml13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index 2e940bdb1..8a544a694 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -629,7 +629,7 @@ Control {
font: textInput.font
horizontalAlignment: textInput.horizontalAlignment
verticalAlignment: textInput.verticalAlignment
- opacity: !textInput.text.length && !textInput.inputMethodComposing ? 1 : 0
+ opacity: textInput.displayText.length ? 0.0 : 1.0
color: __panel ? __panel.placeholderTextColor : "darkgray"
clip: contentWidth > width;
elide: Text.ElideRight
@@ -643,8 +643,8 @@ Control {
selectedTextColor: __panel ? __panel.selectedTextColor : "white"
control: textfield
- cursorHandle: __style ? __style.cursorHandle : undefined
- selectionHandle: __style ? __style.selectionHandle : undefined
+ cursorHandle: __style ? __style.__cursorHandle : undefined
+ selectionHandle: __style ? __style.__selectionHandle : undefined
font: __panel ? __panel.font : TextSingleton.font
anchors.leftMargin: __panel ? __panel.leftMargin : 0
@@ -662,12 +662,7 @@ Control {
Keys.forwardTo: textfield
- onAccepted: {
- Qt.inputMethod.commit()
- if (!(textInput.inputMethodHints & Qt.ImhMultiLine))
- Qt.inputMethod.hide()
- textfield.accepted()
- }
+ onAccepted: textfield.accepted()
onEditingFinished: textfield.editingFinished()
}