summaryrefslogtreecommitdiffstats
path: root/examples/declarative/behaviors/SideRect.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/behaviors/SideRect.qml')
-rw-r--r--examples/declarative/behaviors/SideRect.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/declarative/behaviors/SideRect.qml b/examples/declarative/behaviors/SideRect.qml
new file mode 100644
index 0000000..7caac45
--- /dev/null
+++ b/examples/declarative/behaviors/SideRect.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+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 }
+ }
+}