Hi Bartosh,

2010/12/6 Bartosh Wroblevksy <bart...@live.com>
> I would like to export the properties of the delegate of a listview to make 
> it more reusable. In other words, I would like to do something like this
>
> ListView {
>     id: listview
>     property alias text: myDelegate.text
>
>     delegate: aCustomDelegate {
>             id:myDelegate
>             text: sometext
>     }
> }

What about something like this instead:

ListView {
    id: yourListview
    property string text

    delegate aCustomDelegate {
        id: myDelegate
        text: yourListview.text
    }
}

Should achieve the same effect as your example (i.e. set "text" from outside).

HTH.

Thomas
_______________________________________________
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to