diff options
Diffstat (limited to 'examples/declarative/connections/connections.qml')
-rw-r--r-- | examples/declarative/connections/connections.qml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/declarative/connections/connections.qml b/examples/declarative/connections/connections.qml index 521cc01..b693b7e 100644 --- a/examples/declarative/connections/connections.qml +++ b/examples/declarative/connections/connections.qml @@ -5,6 +5,7 @@ Rectangle { color: "blue" width: 40 height: 30 + Rectangle { id: dot color: "red" @@ -13,19 +14,19 @@ Rectangle { 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; - + color = "green"; + dot.x = mouse.x-1; + dot.y = mouse.y-1; } } } |