diff options
Diffstat (limited to 'examples/declarative/dynamic')
-rw-r--r-- | examples/declarative/dynamic/dynamic.qml | 13 | ||||
-rw-r--r-- | examples/declarative/dynamic/qml/Button.qml (renamed from examples/declarative/dynamic/Button.qml) | 2 | ||||
-rw-r--r-- | examples/declarative/dynamic/qml/GenericItem.qml (renamed from examples/declarative/dynamic/GenericItem.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/dynamic/qml/PaletteItem.qml (renamed from examples/declarative/dynamic/PaletteItem.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/dynamic/qml/PerspectiveItem.qml (renamed from examples/declarative/dynamic/PerspectiveItem.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/dynamic/qml/Sun.qml (renamed from examples/declarative/dynamic/Sun.qml) | 4 | ||||
-rw-r--r-- | examples/declarative/dynamic/qml/itemCreation.js (renamed from examples/declarative/dynamic/itemCreation.js) | 1 |
7 files changed, 11 insertions, 9 deletions
diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml index ea4e0cd..0166b4c 100644 --- a/examples/declarative/dynamic/dynamic.qml +++ b/examples/declarative/dynamic/dynamic.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import "qml" Item { id: window @@ -71,26 +72,26 @@ Item { PaletteItem{ anchors.verticalCenter: parent.verticalCenter file: "Sun.qml"; - image: "images/sun.png" + image: "../images/sun.png" } PaletteItem{ file: "GenericItem.qml" - image: "images/moon.png" + image: "../images/moon.png" } PaletteItem{ anchors.verticalCenter: parent.verticalCenter file: "PerspectiveItem.qml" - image: "images/tree_s.png" + image: "../images/tree_s.png" } PaletteItem{ anchors.verticalCenter: parent.verticalCenter file: "PerspectiveItem.qml" - image: "images/rabbit_brown.png" + image: "../images/rabbit_brown.png" } PaletteItem{ anchors.verticalCenter: parent.verticalCenter file: "PerspectiveItem.qml" - image: "images/rabbit_bw.png" + image: "../images/rabbit_bw.png" } } Text{ text: "Active Suns: " + activeSuns } @@ -108,7 +109,7 @@ Item { } Button { text: "Create" - onClicked: {var obj=createQmlObject(qmlText.text, window, 'CustomObject'); obj.parent=window;} + onClicked: createQmlObject(qmlText.text, window, 'CustomObject'); } } } diff --git a/examples/declarative/dynamic/Button.qml b/examples/declarative/dynamic/qml/Button.qml index 0b8b6db..2769cd8 100644 --- a/examples/declarative/dynamic/Button.qml +++ b/examples/declarative/dynamic/qml/Button.qml @@ -10,7 +10,7 @@ Rectangle { height: text.height + 10 width: text.width + 20 border.width: 1 - radius: 4 + radius: 4; smooth: true gradient: Gradient { GradientStop { position: 0.0; color: if(!mr.pressed){activePalette.light;}else{activePalette.button;} diff --git a/examples/declarative/dynamic/GenericItem.qml b/examples/declarative/dynamic/qml/GenericItem.qml index 10e3dba..10e3dba 100644 --- a/examples/declarative/dynamic/GenericItem.qml +++ b/examples/declarative/dynamic/qml/GenericItem.qml diff --git a/examples/declarative/dynamic/PaletteItem.qml b/examples/declarative/dynamic/qml/PaletteItem.qml index bb6036d..bb6036d 100644 --- a/examples/declarative/dynamic/PaletteItem.qml +++ b/examples/declarative/dynamic/qml/PaletteItem.qml diff --git a/examples/declarative/dynamic/PerspectiveItem.qml b/examples/declarative/dynamic/qml/PerspectiveItem.qml index 9e09dd2..9e09dd2 100644 --- a/examples/declarative/dynamic/PerspectiveItem.qml +++ b/examples/declarative/dynamic/qml/PerspectiveItem.qml diff --git a/examples/declarative/dynamic/Sun.qml b/examples/declarative/dynamic/qml/Sun.qml index a9f5d40..796a370 100644 --- a/examples/declarative/dynamic/Sun.qml +++ b/examples/declarative/dynamic/qml/Sun.qml @@ -3,7 +3,7 @@ import Qt 4.6 Image { id: sun property bool created: false - property string image: "images/sun.png" + property string image: "../images/sun.png" onCreatedChanged: if(created){window.activeSuns++;}else{window.activeSuns--;} source: image; @@ -18,7 +18,7 @@ Image { } states: State { - name: "OffScreen"; when: created && y > window.height/2;//Below the ground + name: "OffScreen"; when: created && y > window.height / 2;//Below the ground StateChangeScript { script: { sun.created = false; sun.destroy() } } } } diff --git a/examples/declarative/dynamic/itemCreation.js b/examples/declarative/dynamic/qml/itemCreation.js index 06e67c5..b3e8ba5 100644 --- a/examples/declarative/dynamic/itemCreation.js +++ b/examples/declarative/dynamic/qml/itemCreation.js @@ -32,6 +32,7 @@ function loadComponent() { createItem(); itemComponent = createComponent(itemButton.file); + print(itemButton.file) if(itemComponent.isLoading){ component.statusChanged.connect(finishCreation); }else{//Depending on the content, it can be ready or error immediately |