aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/demos/calqlatr/calqlatr.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/demos/calqlatr/calqlatr.qml')
-rw-r--r--examples/quick/demos/calqlatr/calqlatr.qml15
1 files changed, 12 insertions, 3 deletions
diff --git a/examples/quick/demos/calqlatr/calqlatr.qml b/examples/quick/demos/calqlatr/calqlatr.qml
index 02c5b13399..8bda2c521e 100644
--- a/examples/quick/demos/calqlatr/calqlatr.qml
+++ b/examples/quick/demos/calqlatr/calqlatr.qml
@@ -53,13 +53,22 @@ Rectangle {
onWidthChanged: controller.reload()
onHeightChanged: controller.reload()
- function operatorPressed(operator) { CalcEngine.operatorPressed(operator) }
- function digitPressed(digit) { CalcEngine.digitPressed(digit) }
+ function operatorPressed(operator) {
+ CalcEngine.operatorPressed(operator)
+ numPad.buttonPressed()
+ }
+ function digitPressed(digit) {
+ CalcEngine.digitPressed(digit)
+ numPad.buttonPressed()
+ }
+ function isButtonDisabled(op) {
+ return CalcEngine.disabled(op)
+ }
Item {
id: pad
width: 180
- NumberPad { y: 10; anchors.horizontalCenter: parent.horizontalCenter }
+ NumberPad { id: numPad; y: 10; anchors.horizontalCenter: parent.horizontalCenter }
}
AnimationController {