summaryrefslogtreecommitdiffstats
path: root/examples/declarative/behaviors/SideRect.qml
blob: d32bd7b7a5c14e61189e00d30ffbd208c2851878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
        }
    }
}