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

Rect {
    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 }
}