diff options
author | Bea Lam <bea.lam@nokia.com> | 2009-10-07 01:35:46 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2009-10-07 01:35:46 (GMT) |
commit | 4937e19f2ec5c51e31806eae1156bb3c19d1e485 (patch) | |
tree | eb5549de888c705a529ef333d39cd3d66db2c35a /examples/declarative/tutorials/samegame/samegame2/samegame.qml | |
parent | a996e73fa08f97ddbe5b860445d2ec7bd5cd69d0 (diff) | |
parent | 75b371c4445739540f135b4cbe099ebf5a182ead (diff) | |
download | Qt-4937e19f2ec5c51e31806eae1156bb3c19d1e485.zip Qt-4937e19f2ec5c51e31806eae1156bb3c19d1e485.tar.gz Qt-4937e19f2ec5c51e31806eae1156bb3c19d1e485.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame2/samegame.qml')
-rw-r--r-- | examples/declarative/tutorials/samegame/samegame2/samegame.qml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml new file mode 100644 index 0000000..e446fa4 --- /dev/null +++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml @@ -0,0 +1,39 @@ +import Qt 4.6 + +Rectangle { + id: Screen + width: 490; height: 720 + + SystemPalette { id: activePalette; colorGroup: Qt.Active } + Script { source: "samegame.js" } + + Item { + width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top + + Image { + id: background + anchors.fill: parent; source: "pics/background.png" + fillMode: "PreserveAspectCrop" + } + } + + Rectangle { + id: ToolBar + color: activePalette.window + height: 32; width: parent.width + anchors.bottom: Screen.bottom + + Button { + id: btnA; text: "New Game"; onClicked: initBoard(); + 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 + } + } +} |