From 4bb8995364ce151b000a3db0e9c2f4a3ed0f0724 Mon Sep 17 00:00:00 2001 From: Andrei Golubev Date: Fri, 2 Jul 2021 10:17:04 +0200 Subject: Modernize calqlatr example Several things are addressed: * some unqualified accesses fixed * parent is replaced with actual ids Change-Id: I5ee1d1a2b1abad468ea330cd4eca0bf0b9b993ed Reviewed-by: Ulf Hermann Reviewed-by: Maximilian Goldstein --- examples/demos/calqlatr/calqlatr.qml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'examples/demos/calqlatr/calqlatr.qml') 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: { -- cgit v1.2.3