[Qt-qml] textInput.text not updated instantly
Gregory Schlomoff
gregory.schlomoff at gmail.com
Fri Sep 17 16:27:20 CEST 2010
Hi,
Maybe you should use onTextChanged, instead?
Cheers,
Greg
On Fri, Sep 17, 2010 at 5:11 PM, rijubrata bhaumik <rijubrata at gmail.com>wrote:
> Hi,
>
> i am using a TextInput element and printing the character thats was
> pressed
> when i press a character, the TextInput.text is updated only in the next
> iteration. I mean console log(event.key) is showing the key that is pressed,
> but it is not updated in the TextInput.text
>
> any suggestions ? i need to send the query.text to process something ..
>
> TextInput {
>
> id: query
>
> text: ""
>
> width: parent.width -10
>
> height: 40
>
> color: "gray";
>
> font.pointSize:15
>
> font.weight : Font.DemiBold
>
> focus: true
>
> anchors.centerIn:parent
>
> Keys.onPressed: {
>
> console.log("KEY PRESSED: " + event.key )
>
> //callMe();
>
> console.log("search term: " + query.text);
>
> }
>
> }
>
>
> regards,
> - Riju
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100917/2c01b2f7/attachment.html
More information about the Qt-qml
mailing list