summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-10-09 01:36:11 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-10-09 01:36:11 (GMT)
commit91c85c76d83260d794701100b36a0cc04f848932 (patch)
tree86fd1204ad8358a0a41d8a61307e1d3e1ce16177 /examples/declarative
parentccb3f7c3bda46ace7b42bff5a27a11bd07602b68 (diff)
parentdda314e206162215e60dd306b6347a04f19ca5df (diff)
downloadQt-91c85c76d83260d794701100b36a0cc04f848932.zip
Qt-91c85c76d83260d794701100b36a0cc04f848932.tar.gz
Qt-91c85c76d83260d794701100b36a0cc04f848932.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: examples/declarative/layouts/Button.qml
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/layouts/Button.qml25
-rw-r--r--examples/declarative/tutorials/contacts/1_Drawing_and_Animation/1/RemoveButton.qml11
-rw-r--r--examples/declarative/webview/content/FieldText.qml2
-rw-r--r--examples/declarative/xmldata/yahoonews.qml2
4 files changed, 7 insertions, 33 deletions
diff --git a/examples/declarative/layouts/Button.qml b/examples/declarative/layouts/Button.qml
index 186512b..44d0c7b 100644
--- a/examples/declarative/layouts/Button.qml
+++ b/examples/declarative/layouts/Button.qml
@@ -1,31 +1,18 @@
import Qt 4.6
-Rectangle {
- id: page
- border.color: "black"
- color: "steelblue"
- radius: 5
- width: pix.width + text.width + 13
- height: pix.height + 10
+Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.width + textelement.width + 13; height: pix.height + 10; id: page
property string text
property string icon
signal clicked
Image { id: pix; x: 5; y:5; source: parent.icon}
-
- Text { id: text; text: page.text; color: "white"; x:pix.width+pix.x+3; anchors.verticalCenter: pix.verticalCenter;}
-
- MouseRegion {
- id: mr
- anchors.fill: parent
- onClicked: { parent.focus = true; page.clicked() }
- }
+ Text { id: textelement; text: page.text; color: "white"; x:pix.width+pix.x+3; anchors.verticalCenter: pix.verticalCenter;}
+ MouseRegion{ id:mr; anchors.fill: parent; onClicked: {parent.focus = true; page.clicked()}}
states:
- State {
- name: "pressed"; when: mr.pressed
- PropertyChanges { target:text; x: 5 }
- PropertyChanges { target:pix; x:text.x+text.width + 3 }
+ State{ name:"pressed"; when:mr.pressed
+ PropertyChanges {target:textelement; x: 5}
+ PropertyChanges {target:pix; x:textelement.x+textelement.width + 3}
}
transitions:
diff --git a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/1/RemoveButton.qml b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/1/RemoveButton.qml
deleted file mode 100644
index a8ac7fe..0000000
--- a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/1/RemoveButton.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import Qt 4.6
-
-//! [0]
-Rectangle {
- id: removeButton
- width: 30
- height: 30
- color: "red"
- radius: 5
-}
-//! [0]
diff --git a/examples/declarative/webview/content/FieldText.qml b/examples/declarative/webview/content/FieldText.qml
index fe55185..2adfbbf 100644
--- a/examples/declarative/webview/content/FieldText.qml
+++ b/examples/declarative/webview/content/FieldText.qml
@@ -10,7 +10,6 @@ Item {
signal cancelled
signal startEdit
- resources: [
Script {
function edit() {
@@ -36,7 +35,6 @@ Item {
}
}
- ]
Image {
id: cancelIcon
diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml
index bad1d88..6d43f46 100644
--- a/examples/declarative/xmldata/yahoonews.qml
+++ b/examples/declarative/xmldata/yahoonews.qml
@@ -32,7 +32,7 @@ Rectangle {
height: wrapper.height + 10
MouseRegion {
anchors.fill: wrapper
- onPressed: { delegate.ListView.list.currentIndex = index; }
+ onPressed: { delegate.ListView.view.currentIndex = index; }
onClicked: { if (wrapper.state == 'Details') { wrapper.state = '';} else {wrapper.state = 'Details';} }
}
Rectangle {