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
{
    width: 1920
    height: 1080

    Image {
        id: logo
        anchors.horizontalCenter: parent.horizontalCenter
        y: 600
        source: "image://etc/Built_with_Qt.png"
    }

    Loader {
        id: dashLoader
        anchors.fill: parent
        source: "DashboardView.qml"
        active: logo.status === Image.Ready
        onLoaded: flipin.start()
    }

    SequentialAnimation {
        id: flipin
        PauseAnimation { duration: 2500 }
        OpacityAnimator { target: logo; from: 1.0; to: 0; duration: 500 }
    }

    function stopAll() {
        dashLoader.item.stopAll()
    }
}