added checkButton
This commit is contained in:
parent
6288bac43a
commit
402ab0d509
1 changed files with 21 additions and 1 deletions
|
@ -10,7 +10,7 @@ Page {
|
||||||
TextField {
|
TextField {
|
||||||
id: sumInput
|
id: sumInput
|
||||||
placeholderText: "sum"
|
placeholderText: "sum"
|
||||||
visible: !won.visible
|
visible: !endPageVisibility
|
||||||
validator: IntValidator {bottom: -1000000; top: 1000000;}
|
validator: IntValidator {bottom: -1000000; top: 1000000;}
|
||||||
anchors {
|
anchors {
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
@ -19,6 +19,24 @@ Page {
|
||||||
}
|
}
|
||||||
Keys.onReturnPressed: calculator.checkSum(sumInput.text)
|
Keys.onReturnPressed: calculator.checkSum(sumInput.text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RoundButton {
|
||||||
|
id: checkButton
|
||||||
|
height: parent.width * 0.2
|
||||||
|
width: height
|
||||||
|
text: "check"
|
||||||
|
font.pixelSize: parent.width * 0.03
|
||||||
|
visible: !endPageVisibility
|
||||||
|
anchors {
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
top: parent.top
|
||||||
|
topMargin: parent.height * 0.3
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
calculator.checkSum(sumInput.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: won
|
id: won
|
||||||
text: calculator.endPageLabelText
|
text: calculator.endPageLabelText
|
||||||
|
@ -71,6 +89,7 @@ Page {
|
||||||
height: parent.width * 0.2
|
height: parent.width * 0.2
|
||||||
width: height
|
width: height
|
||||||
text: "home"
|
text: "home"
|
||||||
|
font.pixelSize: parent.width * 0.03
|
||||||
visible: endPageVisibility
|
visible: endPageVisibility
|
||||||
anchors {
|
anchors {
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
@ -83,4 +102,5 @@ Page {
|
||||||
calculator.state = "starting"
|
calculator.state = "starting"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue