summaryrefslogtreecommitdiffstats
path: root/examples/declarative/behaviours/SideRect.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/behaviours/SideRect.qml')
-rw-r--r--examples/declarative/behaviours/SideRect.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/declarative/behaviours/SideRect.qml b/examples/declarative/behaviours/SideRect.qml
new file mode 100644
index 0000000..c7c7ebf
--- /dev/null
+++ b/examples/declarative/behaviours/SideRect.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+
+Rectangle {
+ id: myRect
+
+ property string text
+
+ color: "black"
+ width: 75; height: 50
+ radius: 5
+ border.width: 10; border.color: "white";
+ MouseRegion {
+ anchors.fill: parent
+ hoverEnabled: true
+ onEntered: { focusRect.x = myRect.x; focusRect.y = myRect.y; focusRect.text = myRect.text }
+ }
+}