summaryrefslogtreecommitdiffstats
path: root/examples/declarative/connections/connections.qml
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-04-27 10:38:12 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2009-04-27 10:38:12 (GMT)
commit38d90a2d93d51325ef5dad0904eab2e3a30f3064 (patch)
treeed78ece6de5533afdb7861d2ac653d59762b3c56 /examples/declarative/connections/connections.qml
parent1d01ff1e958a632e665084cf6dbf7c6bbaf4f0c5 (diff)
downloadQt-38d90a2d93d51325ef5dad0904eab2e3a30f3064.zip
Qt-38d90a2d93d51325ef5dad0904eab2e3a30f3064.tar.gz
Qt-38d90a2d93d51325ef5dad0904eab2e3a30f3064.tar.bz2
Converted connections, listview and mouse.
Diffstat (limited to 'examples/declarative/connections/connections.qml')
-rw-r--r--examples/declarative/connections/connections.qml38
1 files changed, 29 insertions, 9 deletions
diff --git a/examples/declarative/connections/connections.qml b/examples/declarative/connections/connections.qml
index 45c0e99..e66875a 100644
--- a/examples/declarative/connections/connections.qml
+++ b/examples/declarative/connections/connections.qml
@@ -1,9 +1,29 @@
-<Rect id="rect" color="blue" width="40" height="30">
- <Rect id="dot" color="red" width="3" height="3" x="{rect.width/2}" y="{rect.height/2}"/>
- <MouseRegion id="mr" anchors.fill="{rect}"/>
- <Connection sender="{mr}" signal="clicked(mouse)">
- color="green";
- dot.x = mouse.x-1;
- dot.y = mouse.y-1;
- </Connection>
-</Rect>
+Rect {
+ id: rect
+ color: "blue"
+ width: 40
+ height: 30
+ Rect {
+ id: dot
+ color: "red"
+ width: 3
+ height: 3
+ x: rect.width/2
+ y: rect.height/2
+ }
+ MouseRegion {
+ id: mr
+ anchors.fill: rect
+ }
+ Connection {
+ sender: mr
+ signal: "clicked(mouse)"
+ script: {
+
+ color="green";
+ dot.x = mouse.x-1;
+ dot.y = mouse.y-1;
+
+ }
+ }
+}