summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcomponent.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-05-01 06:39:43 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-05-01 06:39:43 (GMT)
commitdac26313fcfc3862a7f2aeaa58bb2afe0d494ec9 (patch)
tree806d441c2864107ad9d8c32246e75af15f0ed106 /src/declarative/qml/qmlcomponent.cpp
parent8f52aee209aa64ef6719126547c767583870bd9f (diff)
downloadQt-dac26313fcfc3862a7f2aeaa58bb2afe0d494ec9.zip
Qt-dac26313fcfc3862a7f2aeaa58bb2afe0d494ec9.tar.gz
Qt-dac26313fcfc3862a7f2aeaa58bb2afe0d494ec9.tar.bz2
doc
Diffstat (limited to 'src/declarative/qml/qmlcomponent.cpp')
-rw-r--r--src/declarative/qml/qmlcomponent.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp
index 2c3ebd6..c316f03 100644
--- a/src/declarative/qml/qmlcomponent.cpp
+++ b/src/declarative/qml/qmlcomponent.cpp
@@ -89,16 +89,20 @@ bool QmlComponentPrivate::isXml(const QByteArray &ba)
file, or for defining a component that logically belongs with the
file containing it.
- \code
- <Item>
- <Component id="RedSquare">
- <Rect color="red" width="10" height="10"/>
- </Component>
-
- <ComponentInstance component="{RedSquare}"/>
- <ComponentInstance component="{RedSquare}" x="20"/>
- </Item>
- \endcode
+ \qml
+Item {
+ Component {
+ id: RedSquare
+ Rect {
+ color: "red"
+ width: 10
+ height: 10
+ }
+ }
+ ComponentInstance { component: RedSquare }
+ ComponentInstance { component: RedSquare; x: 20 }
+}
+ \endqml
*/
QML_DEFINE_TYPE(QmlComponent,Component);