aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/animation/behaviors/SideRect.qml
blob: d961fe149ef8d2888c9d886f71d0a84ec1f33ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick 2.0

Rectangle {
    id: myRect

    property FocusRect focusItem
    property string text

    width: 75; height: 50
    radius: 6
    color: "#646464"
    border.width: 4; border.color: "white"

    MouseArea {
        anchors.fill: parent
        hoverEnabled: true
        onEntered: {
            myRect.focusItem.x = myRect.x;
            myRect.focusItem.y = myRect.y;
            myRect.focusItem.text = myRect.text;
        }
    }
}