diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-04-23 04:58:41 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-04-23 04:58:41 (GMT) |
commit | 89d18c86e093befc2fc8cd7fc852610f6e23696b (patch) | |
tree | 4b90767ac8528ec382e47aa0b5de4a9cafbcee84 /src/declarative/fx/qfxcomponentinstance.cpp | |
parent | 5dffa762ad42ea77e09ac6b21eb79ca19a2aef4b (diff) | |
download | Qt-89d18c86e093befc2fc8cd7fc852610f6e23696b.zip Qt-89d18c86e093befc2fc8cd7fc852610f6e23696b.tar.gz Qt-89d18c86e093befc2fc8cd7fc852610f6e23696b.tar.bz2 |
Component and ComponentInstance documentation.
Diffstat (limited to 'src/declarative/fx/qfxcomponentinstance.cpp')
-rw-r--r-- | src/declarative/fx/qfxcomponentinstance.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxcomponentinstance.cpp b/src/declarative/fx/qfxcomponentinstance.cpp index d561d05..b456716 100644 --- a/src/declarative/fx/qfxcomponentinstance.cpp +++ b/src/declarative/fx/qfxcomponentinstance.cpp @@ -60,6 +60,16 @@ QML_DEFINE_TYPE(QFxComponentInstance,ComponentInstance); /*! \qmlclass ComponentInstance QFxComponentInstance \brief The ComponentInstance element allows you to instantiate an arbitrary component. + + \code + <Item> + <Component id="RedSquare"> + <Rect color="red" width="10" height="10"/> + </Component> + + <ComponentInstance component="{RedSquare}"/> + </Item> + \endcode */ QFxComponentInstance::QFxComponentInstance(QFxItem *parent) : QFxItem(*(new QFxComponentInstancePrivate), parent) @@ -73,6 +83,11 @@ QFxComponentInstance::QFxComponentInstance(QFxComponentInstancePrivate &dd, QFxI setOptions(IsFocusRealm); } +/*! + \qmlproperty Component QFxComponentInstance::component + + This property holds the component to instantiate. +*/ QmlComponent *QFxComponentInstance::component() const { Q_D(const QFxComponentInstance); @@ -123,6 +138,11 @@ void QFxComponentInstance::updateSize() } } +/*! + \qmlproperty Item QFxComponentInstance::instance + + This property holds the instantiated component. +*/ QFxItem *QFxComponentInstance::instance() const { Q_D(const QFxComponentInstance); |