summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tic-tac-toe
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-04-13 06:04:40 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-04-13 06:07:19 (GMT)
commit38ddecfd87399ed92729f122d940cce812c44ec2 (patch)
treed52395429119e8e38b8624682f0da1018fe4e527 /examples/declarative/tic-tac-toe
parenta34993a9d8d1b9b3f3ad30604dbad3ad456bbdcd (diff)
downloadQt-38ddecfd87399ed92729f122d940cce812c44ec2.zip
Qt-38ddecfd87399ed92729f122d940cce812c44ec2.tar.gz
Qt-38ddecfd87399ed92729f122d940cce812c44ec2.tar.bz2
Example fixes
Diffstat (limited to 'examples/declarative/tic-tac-toe')
-rw-r--r--examples/declarative/tic-tac-toe/content/Button.qml8
-rw-r--r--examples/declarative/tic-tac-toe/tic-tac-toe.qml10
2 files changed, 8 insertions, 10 deletions
diff --git a/examples/declarative/tic-tac-toe/content/Button.qml b/examples/declarative/tic-tac-toe/content/Button.qml
index 56e5ecd..ecf18cd 100644
--- a/examples/declarative/tic-tac-toe/content/Button.qml
+++ b/examples/declarative/tic-tac-toe/content/Button.qml
@@ -9,7 +9,7 @@ Rectangle {
property string darkCol: "darkgray"
property string lightCol: "white"
- width: txtItem.width + 20; height: txtItem.height + 6
+ width: buttonLabel.width + 20; height: buttonLabel.height + 6
border { width: 1; color: Qt.darker(mainCol) }
radius: 8;
color: mainCol
@@ -28,12 +28,10 @@ Rectangle {
MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
Text {
- id: txtItem
+ id: buttonLabel
anchors.centerIn: container
text: container.text;
- color: "blue"
- style: Text.Outline; styleColor: "white"
- font.pixelSize: 14; font.bold: true
+ font.pixelSize: 14
}
}
diff --git a/examples/declarative/tic-tac-toe/tic-tac-toe.qml b/examples/declarative/tic-tac-toe/tic-tac-toe.qml
index 62bb56f..dd13052 100644
--- a/examples/declarative/tic-tac-toe/tic-tac-toe.qml
+++ b/examples/declarative/tic-tac-toe/tic-tac-toe.qml
@@ -5,8 +5,8 @@ import "content/tic-tac-toe.js" as Logic
Item {
id: game
- property bool show: false;
- property real difficulty: 1.0; //chance it will actually think
+ property bool show: false
+ property real difficulty: 1.0 //chance it will actually think
width: 440
height: 480
@@ -50,17 +50,17 @@ Item {
Button {
text: "Hard"
- onClicked: game.difficulty=1.0;
+ onClicked: game.difficulty = 1.0;
down: game.difficulty == 1.0
}
Button {
text: "Moderate"
- onClicked: game.difficulty=0.8;
+ onClicked: game.difficulty = 0.8;
down: game.difficulty == 0.8
}
Button {
text: "Easy"
- onClicked: game.difficulty=0.2;
+ onClicked: game.difficulty = 0.2;
down: game.difficulty == 0.2
}
}