diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-03-18 12:45:51 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-03-22 15:00:53 +0000 |
commit | c070eb7e43a3111b2ca1cfc2084394d3a11a75a5 (patch) | |
tree | 5273b4e6e33d2af7e6225d0af1854d07ac601094 /examples/scxml/trafficlight-common/Button.qml | |
parent | 4e4f0f1cc2a96c7b27ee368d1f045e95a210a742 (diff) |
Polish traffic light example
Change-Id: I85f56f87b985ff966b975c571a399fa8f1f6e86f
Reviewed-by: Diana de Sousa <diana.desousa@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'examples/scxml/trafficlight-common/Button.qml')
-rw-r--r-- | examples/scxml/trafficlight-common/Button.qml | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/examples/scxml/trafficlight-common/Button.qml b/examples/scxml/trafficlight-common/Button.qml index 36bec5f..24512ce 100644 --- a/examples/scxml/trafficlight-common/Button.qml +++ b/examples/scxml/trafficlight-common/Button.qml @@ -50,31 +50,13 @@ import QtQuick 2.5 -Item { +Image { id: button signal clicked - property string text: "hello" - Rectangle { - x: 5 - y: 5 - width: parent.width - 10 - height: parent.height - 10 - radius: 5 - color: "blue" - - Text { - anchors.fill: parent - color: "white" - text: button.text - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - - MouseArea { - id: mouse - anchors.fill: parent - onClicked: button.clicked() - } + MouseArea { + id: mouse + anchors.fill: parent + onClicked: button.clicked() } } |