[Qt-qml] Element at 'index' in Column or Row

Christian Kamm christian.d.kamm at nokia.com
Wed Apr 28 09:21:34 CEST 2010


On Wednesday 28 April 2010 09:03:02 ext Rakesh.Mutharaju at tieto.com wrote:
>         How can I access Element at particular 'index' in Column or Row.
>  Basically I would like to update the content of element at runtime.
>
> For eg.,
> 
> Column {
> id: testcolumn
> spacing: 2
> height: 150
> width:100
>         Repeater{
>                 model: 10
>                 Text{
>                         id: textelement
>                         height: 10
>                         text: "test"+index
>                    }
>         }
> }
> 
> I would like to update the Text element at index '5' , how can access the
>  Text element??

I'm fairly sure testcolumn.children[5].text = "foo" should do it.

Regards,
Christian



More information about the Qt-qml mailing list