aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/tableview/abstracttablemodel/Button.qml
blob: d49f2102a2159e806449cd1eabe0307f533d2d82 (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
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick 2.12

Rectangle {
    width: 110
    height: 40
    border.width: 1
    color: "lightgreen"

    property string text
    signal clicked

    Text {
        anchors.centerIn: parent
        text: parent.text
    }

    MouseArea {
        anchors.fill: parent
        onClicked: parent.clicked()
    }
}