[Qt-qml] How to update item within a Row

mathias.malmqvist at nokia.com mathias.malmqvist at nokia.com
Sun Jan 2 18:50:04 CET 2011


Although I appreciate any votes I can get on my defects reports ;) that is the 
wrong way to solve your problem. 

The right way is to create a ListModel containing ListElements holding the properties 
that you bind to the items in the Row. Then to change an item in the row just change 
the property of that ListElement.


Cheers
Mathias

________________________________________
From: qt-qml-bounces+mathias.malmqvist=nokia.com at qt.nokia.com [qt-qml-bounces+mathias.malmqvist=nokia.com at qt.nokia.com] on behalf of ext Girish Ramakrishnan [girish at forwardbias.in]
Sent: Sunday, January 02, 2011 5:39 PM
To: Mark Constable
Cc: qt-qml at qt.nokia.com
Subject: Re: [Qt-qml] How to update item within a Row

Currently, the only way is to access the Row's children. Vote for
http://bugreports.qt.nokia.com/browse/QTBUG-15161.

Girish

On Sun, Jan 2, 2011 at 5:52 PM, Mark Constable <markc at renta.net> wrote:
> Newb question, if I use something like the below Row construct,
> how can I find and update, say, the content of the 4th item?
>
>  Row {
>    id: desk
>    width: view.width
>    height: view.height
>    Repeater {
>      model: 10
>      Rectangle {
>        id: content
>        width: view.width
>        height: view.height
>        Text {
>          anchors.centerIn: parent
>          text: "<h1>Desktop "+(index+1)+"</h1>"
>        }
>      }
>    }
>  }
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>
_______________________________________________
Qt-qml mailing list
Qt-qml at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml


More information about the Qt-qml mailing list