summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-05-19 14:38:37 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-05-19 14:38:37 (GMT)
commit38420b1f63162802ede4861faf6d34dfa956d486 (patch)
tree20a192420bbd44840a3193a40cf64461e62f89ed /examples
parent7bb43814f4eb919b330b29eef52efbaf92c698b0 (diff)
downloadQt-38420b1f63162802ede4861faf6d34dfa956d486.zip
Qt-38420b1f63162802ede4861faf6d34dfa956d486.tar.gz
Qt-38420b1f63162802ede4861faf6d34dfa956d486.tar.bz2
Fix dynamicscene example
In all the renaming (presumably) the moon broke, now fixed. Also made it slightly smaller, to be friendlier to desktop systems with small screens (and the fixed size qtdemo)
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/toys/dynamicscene/dynamicscene.qml10
-rw-r--r--examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml9
-rw-r--r--examples/declarative/toys/dynamicscene/qml/itemCreation.js2
3 files changed, 16 insertions, 5 deletions
diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml
index 52c7c1e..2aa15e5 100644
--- a/examples/declarative/toys/dynamicscene/dynamicscene.qml
+++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml
@@ -8,7 +8,8 @@ Item {
property int activeSuns: 0
//This is a desktop-sized example
- width: 1024; height: 512
+ width: 800; height: 480
+
//This is the message box that pops up when there's an error
Rectangle {
@@ -79,7 +80,7 @@ Item {
Rectangle {
id: toolbox
- width: 480
+ width: 380
color: activePalette.window
anchors { right: parent.right; top: parent.top; bottom: parent.bottom }
@@ -132,7 +133,7 @@ Item {
Text { text: "Arbitrary QML:" }
Rectangle {
- width: 460; height: 240
+ width: 360; height: 240
TextEdit {
id: qmlText
@@ -140,8 +141,9 @@ Item {
readOnly: false
focusOnPress: true
font.pixelSize: 14
+ wrapMode: TextEdit.WordWrap
- text: "import Qt 4.7\nImage {\n id: smile\n x: 500 * Math.random()\n y: 200 * Math.random() \n source: 'images/face-smile.png'\n\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n\n Component.onCompleted: smile.destroy(1500);\n}"
+ text: "import Qt 4.7\nImage {\n id: smile\n x: 360 * Math.random()\n y: 180 * Math.random() \n source: 'images/face-smile.png'\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n Component.onCompleted: smile.destroy(1500);\n}"
}
}
diff --git a/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml b/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml
new file mode 100644
index 0000000..de096ad
--- /dev/null
+++ b/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml
@@ -0,0 +1,9 @@
+import Qt 4.7
+
+Image {
+ property bool created: false
+ property string image
+
+ source: image
+
+}
diff --git a/examples/declarative/toys/dynamicscene/qml/itemCreation.js b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
index 59750f3..443c448 100644
--- a/examples/declarative/toys/dynamicscene/qml/itemCreation.js
+++ b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
@@ -36,7 +36,7 @@ function createItem() {
} else if (itemComponent.status == Component.Error) {
draggedItem = null;
console.log("error creating component");
- console.log(component.errorsString());
+ console.log(itemComponent.errorsString());
}
}