[Qt-qml] Component element: what is it for ?
Stephen Collyer
scollyer at netspinner.co.uk
Thu Jul 22 17:57:35 CEST 2010
On 22 July 2010 16:44, Sacha Zyto <sacha at mit.edu> wrote:
> Hi Stephen,
>
> My understanding is that an Item placed inside a widget will be included in
> the UI tree at that place, and hence displayed, which you don't want, say,
> if you've designed your component to be used as a "template" or a"lens" in
> order to be used by a View to render Items that are inside a Model.
>
Right. Assuming that your explanation is correct, that makes sense.
In that case, a Component is essentially the QML equivalent of a
class, defining an object template but not instantiating it. I'll have to
play
around with this to see exactly how it works.
Does an Item, conversely, both define an object template and
instantiate it, so that an Item can be used anywhere a Component
can be used ?
--
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100722/82c48372/attachment.html
More information about the Qt-qml
mailing list