diff options
Diffstat (limited to 'examples/declarative/behaviours/SideRect.qml')
-rw-r--r-- | examples/declarative/behaviours/SideRect.qml | 17 |
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 } + } +} |