[TextField] Bind to TextField length instead of text

Copying strings in QML is expensive.

REVIEW: 128550
This commit is contained in:
Kai Uwe Broulik 2016-07-29 15:41:40 +02:00
parent 16f8257068
commit 42193ae631

View File

@ -80,7 +80,7 @@ QtControls.TextField {
source: "edit-clear-locationbar-rtl"
height: Math.max(parent.height*0.8, units.iconSizes.small)
width: height
opacity: (textField.text != "" && clearButtonShown && textField.enabled) ? 1 : 0
opacity: (textField.length > 0 && clearButtonShown && textField.enabled) ? 1 : 0
Behavior on opacity {
NumberAnimation {
duration: units.longDuration