added checkButton

This commit is contained in:
Max 2018-11-26 20:05:20 +01:00
parent 6288bac43a
commit 402ab0d509
1 changed files with 21 additions and 1 deletions

View File

@ -10,7 +10,7 @@ Page {
TextField {
id: sumInput
placeholderText: "sum"
visible: !won.visible
visible: !endPageVisibility
validator: IntValidator {bottom: -1000000; top: 1000000;}
anchors {
horizontalCenter: parent.horizontalCenter
@ -19,6 +19,24 @@ Page {
}
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 {
id: won
text: calculator.endPageLabelText
@ -71,6 +89,7 @@ Page {
height: parent.width * 0.2
width: height
text: "home"
font.pixelSize: parent.width * 0.03
visible: endPageVisibility
anchors {
horizontalCenter: parent.horizontalCenter
@ -83,4 +102,5 @@ Page {
calculator.state = "starting"
}
}
}