diff options
Diffstat (limited to 'doc/src/declarative/qmlforcpp.qdoc')
-rw-r--r-- | doc/src/declarative/qmlforcpp.qdoc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/src/declarative/qmlforcpp.qdoc b/doc/src/declarative/qmlforcpp.qdoc index 53af252..5838df7 100644 --- a/doc/src/declarative/qmlforcpp.qdoc +++ b/doc/src/declarative/qmlforcpp.qdoc @@ -29,7 +29,7 @@ \code QmlEngine engine; - QmlComponent redRectangle(&engine, "Rect { color: \"red\"; width: 100; height: 100 }"); + QmlComponent redRectangle(&engine, "Rectangle { color: \"red\"; width: 100; height: 100 }"); for (int ii = 0; ii < 100; ++ii) { QObject *rectangle = redRectangle.create(); // ... do something with the rectangle ... @@ -127,7 +127,7 @@ added to the parent's \c children property. \code - Rect { + Rectangle { Image {} Text {} } @@ -208,14 +208,14 @@ rectangles height would be updated automatically. \code - Rect { + Rectangle { color: "red" width: 100 - Rect { + Rectangle { color: "blue" width: 50 height: parent.height - Rect { + Rectangle { color: "green" width: 25 height: parent.height @@ -283,14 +283,14 @@ example rewritten to do just that. \code - Rect { + Rectangle { color: "red" width: 100 - Rect { + Rectangle { color: "blue" width: 50 height: parent.height - Rect { + Rectangle { color: "green" width: 25 height: parent.parent.height @@ -313,15 +313,15 @@ a component. By convention, id's should start with an uppercase letter. \code - Rect { + Rectangle { id: Root color: "red" width: GreenRect.width + 75 height: Root.height - Rect { + Rectangle { color: "blue" width: GreenRect.width + 25 - Rect { + Rectangle { id: GreenRect color: "green" width: 25 @@ -554,7 +554,7 @@ Consider the following example. \code - Rect { + Rectangle { x: NumberAnimation { running: true; repeat; true; from: 0; to: 100; } } \endcode |