On Friday 17 June 2011, Viranch Mehta wrote: > However, if I use it as follows, it works: > > Row { > Repeater { > model: ["hello", "world"] > delegate: Item { > id: delegateItem > Text { text: modelData } > } > } > > But this makes the code look really messed up. Any alternatives? > > Viranch enclosing the first item that then you use as a delegate in a Component {} declaration should solve it (it creates the component but not the insatance)
however. usually the preferred prettiest thing is to usually declare delegates in separate files, especially when they reach a certain size... so you would do Row { Repeater { model: ["hello", "world"] MyFancyDelegate {} } } then you have MyFancyDelegate.qml Cheers, Marco Martin _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel