C
Qt Cluster: Rendering and Recovery from Main UI Failure
// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause // This file is part of the Qt Safe Renderer module import QtQuick import ClusterDemo Item { property real turbometerNeedleRotation: turboValue * turboDegreesPerValue property real turboValue: ValueSource.rpm / 2000. property real maxValueAngle: 270 property real minValueAngle: 0 property real maximumValue: 4.0 property real turboDegreesPerValue: Math.abs((maxValueAngle - minValueAngle) / maximumValue) anchors.left: parent.left anchors.top: parent.top anchors.leftMargin: 426 anchors.topMargin: 93 width: 109 height: 7 rotation: turbometerNeedleRotation - 90 Image { width: 38 height: 3 //opacity: 0.75 anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter source: "image://etc/SpeedometerNeedle.png" } Behavior on turboValue { enabled: !ValueSource.automaticDemoMode && startupAnimationsFinished PropertyAnimation { duration: 250 } } }