summaryrefslogtreecommitdiffstats
path: root/examples/demos/calqlatr/calqlatr.qml
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-07-02 10:17:04 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2021-07-05 09:32:03 +0200
commit4bb8995364ce151b000a3db0e9c2f4a3ed0f0724 (patch)
tree68498f0d1a565fa86977a13485ebbbbb9911652b /examples/demos/calqlatr/calqlatr.qml
parent3f6b0e5306b1fb3cf2c5fb2a401f5b817d69a66e (diff)
Modernize calqlatr example
Several things are addressed: * some unqualified accesses fixed * parent is replaced with actual ids Change-Id: I5ee1d1a2b1abad468ea330cd4eca0bf0b9b993ed Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Diffstat (limited to 'examples/demos/calqlatr/calqlatr.qml')
-rw-r--r--examples/demos/calqlatr/calqlatr.qml14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/demos/calqlatr/calqlatr.qml b/examples/demos/calqlatr/calqlatr.qml
index 75d402d4b..863f8de49 100644
--- a/examples/demos/calqlatr/calqlatr.qml
+++ b/examples/demos/calqlatr/calqlatr.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -78,7 +78,7 @@ Rectangle {
Item {
id: pad
width: 180
- NumberPad { id: numPad; y: 10; anchors.horizontalCenter: parent.horizontalCenter }
+ NumberPad { id: numPad; y: 10; anchors.horizontalCenter: pad.horizontalCenter }
}
AnimationController {
@@ -94,7 +94,7 @@ Rectangle {
}
}
- Keys.onPressed: {
+ Keys.onPressed: function(event) {
if (event.key == Qt.Key_0)
digitPressed("0")
else if (event.key == Qt.Key_1)
@@ -135,7 +135,7 @@ Rectangle {
id: display
x: -16
width: window.width - pad.width
- height: parent.height
+ height: window.height
MouseArea {
id: mouseInput
@@ -144,9 +144,9 @@ Rectangle {
property bool rewind: false
anchors {
- bottom: parent.bottom
- left: parent.left
- right: parent.right
+ bottom: display.bottom
+ left: display.left
+ right: display.right
}
height: 50
onPositionChanged: {