aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/animation/behaviors/SideRect.qml
blob: 5230e5a406691a69b981bbdc1193904c7bb9768d (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

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;
        }
    }
}