summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/shared/qmlvisualaids/Button.qml
blob: 600079f13828331bd6588772bb63a4ed768ef4cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import Qt 4.7

Rectangle {
    width: txt.width + 16
    height: txt.height + 8
    radius: 4
    border.color: "black"
    property alias caption: txt.text
    signal triggered
    Text{
        id: txt
        text: "Button"
        anchors.centerIn: parent
    }
    MouseArea{
        anchors.fill: parent
        onClicked: parent.triggered()
    }
}