diff options
| author | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-05-12 15:01:55 (GMT) |
|---|---|---|
| committer | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-05-12 15:01:55 (GMT) |
| commit | d41ccae68683dd0d35c20affec7e5c55ce6bca37 (patch) | |
| tree | 270fe804f2b130243da4e714cc1a135690bc466d /doc/src/snippets/declarative/createQmlObject.qml | |
| parent | 5987412720498aa22202a1bcca3cb988a9cf5606 (diff) | |
| parent | 41cbfc5c8e6644ab21e92860db95b2e8da9aba6a (diff) | |
| download | Qt-d41ccae68683dd0d35c20affec7e5c55ce6bca37.zip Qt-d41ccae68683dd0d35c20affec7e5c55ce6bca37.tar.gz Qt-d41ccae68683dd0d35c20affec7e5c55ce6bca37.tar.bz2 | |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'doc/src/snippets/declarative/createQmlObject.qml')
| -rw-r--r-- | doc/src/snippets/declarative/createQmlObject.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml new file mode 100644 index 0000000..6b331c4 --- /dev/null +++ b/doc/src/snippets/declarative/createQmlObject.qml @@ -0,0 +1,18 @@ +import Qt 4.7 + +Rectangle { + id: targetItem + property QtObject newObject + + width: 100 + height: 100 + + function createIt() { +//![0] +newObject = Qt.createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}', + targetItem, "dynamicSnippet1"); +//![0] + } + + Component.onCompleted: createIt() +} |
