import QtQuick 1.1 Item{ Column{ Text{text: ti.displayText} Text{text: ti.text} Item{ id: wrapper width: ti.width height: ti.height function genText(showLast){ var ret = ti.displayText.slice(0,showLast?ti.text.length-1:undefined); if(showLast){ ret += ti.text.slice(ti.text.length-1, ti.text.length); hideTimer.restart(); } return ret; } Timer{ id: hideTimer interval: 500 repeat: false onTriggered: fakeTi.text = wrapper.genText(false); } TextInput{ id: ti focus: true echoMode: TextInput.Password opacity: 0 onTextChanged: fakeTi.text = wrapper.genText(true); } TextInput{ id: fakeTi focus: false echoMode: TextInput.Normal } } } }