summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxcomponentinstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/fx/qfxcomponentinstance.cpp')
-rw-r--r--src/declarative/fx/qfxcomponentinstance.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/declarative/fx/qfxcomponentinstance.cpp b/src/declarative/fx/qfxcomponentinstance.cpp
index 5343f7d..5fb5466 100644
--- a/src/declarative/fx/qfxcomponentinstance.cpp
+++ b/src/declarative/fx/qfxcomponentinstance.cpp
@@ -61,13 +61,14 @@ QML_DEFINE_TYPE(QFxComponentInstance,ComponentInstance);
\brief The ComponentInstance element allows you to instantiate a \l{qml-component.html} {Component}.
\code
- <Item>
- <Component id="RedSquare">
- <Rect color="red" width="10" height="10"/>
- </Component>
+ Item {
+ Component {
+ id: RedSquare
+ Rect { color: "red"; width: 10; height: 10 }
+ }
- <ComponentInstance component="{RedSquare}"/>
- </Item>
+ ComponentInstance { component: RedSquare }
+ }
\endcode
*/
QFxComponentInstance::QFxComponentInstance(QFxItem *parent)