summaryrefslogtreecommitdiffstats
path: root/examples/declarative/animation/behaviors/SideRect.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/animation/behaviors/SideRect.qml')
-rw-r--r--examples/declarative/animation/behaviors/SideRect.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/declarative/animation/behaviors/SideRect.qml b/examples/declarative/animation/behaviors/SideRect.qml
new file mode 100644
index 0000000..d32bd7b
--- /dev/null
+++ b/examples/declarative/animation/behaviors/SideRect.qml
@@ -0,0 +1,22 @@
+import Qt 4.7
+
+Rectangle {
+ id: myRect
+
+ property string text
+
+ width: 75; height: 50
+ radius: 6
+ color: "#646464"
+ border.width: 4; border.color: "white"
+
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ onEntered: {
+ focusRect.x = myRect.x;
+ focusRect.y = myRect.y;
+ focusRect.text = myRect.text;
+ }
+ }
+}