diff options
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame1/samegame.qml')
-rw-r--r-- | examples/declarative/tutorials/samegame/samegame1/samegame.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml new file mode 100644 index 0000000..c2d3939 --- /dev/null +++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml @@ -0,0 +1,40 @@ +//![0] +import Qt 4.6 + +Rectangle { + id: screen + width: 490; height: 720 + + SystemPalette { id: activePalette } + + Item { + width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top + + Image { + id: background + anchors.fill: parent; source: "pics/background.png" + fillMode: Image.PreserveAspectCrop + } + } + + Rectangle { + id: toolbar + color: activePalette.window + height: 32; width: parent.width + anchors.bottom: screen.bottom + + Button { + id: btnA; text: "New Game"; onClicked: console.log("Implement me!"); + anchors.left: parent.left; anchors.leftMargin: 3 + anchors.verticalCenter: parent.verticalCenter + } + + Text { + id: score + text: "Score: Who knows?"; font.bold: true + anchors.right: parent.right; anchors.rightMargin: 3 + anchors.verticalCenter: parent.verticalCenter + } + } +} +//![0] |