diff options
author | Samuel Nevala <samuel.nevala@digia.com> | 2014-10-21 16:32:21 +0300 |
---|---|---|
committer | Samuel Nevala <samuel.nevala@digia.com> | 2014-10-30 06:59:50 +0100 |
commit | 052dea3003b393d2ebb6754d0ed2fd7329cd8d26 (patch) | |
tree | 79985ad06925ba5e147ad22c8ccdeed6da31af4d /src/controls/TextField.qml | |
parent | 174d4fbbb85b6894e0773bc423269a5df64d3f59 (diff) | |
download | qtquickcontrols-052dea3003b393d2ebb6754d0ed2fd7329cd8d26.tar.gz |
Placeholder text in TextField disappears on TextField tap.
Instead of TextInput.inputMethodComposingtext and TextInput.text.length
use TextInput.displayText.length to determine if placeholder should be
visible.
Task-number: QTBUG-40534
Change-Id: I0de2cb65c7c59d54365172b9233a5aba0f067ff5
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/TextField.qml')
-rw-r--r-- | src/controls/TextField.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml index 3d31162c..a7aa67eb 100644 --- a/src/controls/TextField.qml +++ b/src/controls/TextField.qml @@ -619,7 +619,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 |