From b957118a2d2f44cec5f1a0709da26a5c685cc344 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 9 Oct 2009 11:10:43 +1000 Subject: Fix example errors --- examples/declarative/layouts/Button.qml | 8 ++++---- examples/declarative/webview/content/FieldText.qml | 2 -- examples/declarative/xmldata/yahoonews.qml | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/declarative/layouts/Button.qml b/examples/declarative/layouts/Button.qml index 6c2fd8d..1fa0dee 100644 --- a/examples/declarative/layouts/Button.qml +++ b/examples/declarative/layouts/Button.qml @@ -1,16 +1,16 @@ import Qt 4.6 -Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.width + text.width + 13; height: pix.height + 10; id: page +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;} + 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} + PropertyChanges {target:textelement; x: 5} + PropertyChanges {target:pix; x:textelement.x+textelement.width + 3} } transitions: 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 { -- cgit v0.12