summaryrefslogtreecommitdiffstats
path: root/examples/declarative/loader/Button.qml
blob: 928ff0623eafa4cca60c663f6a7d3348271090b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import Qt 4.6

Rectangle {
    id: container

    property var text
    signal clicked

    height: text.height + 10
    width: text.width + 20
    border.width: 1
    radius: 4
    color: "grey"
    MouseRegion { anchors.fill: parent; onClicked: container.clicked() }
    Text { id: text; anchors.centerIn:parent; font.pointSize: 10; text: parent.text }
}