C
Qt Quick Ultralite multiscreen Example
// Copyright (C) 2024 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial import QtQuick 2.15 import QtQuickUltralite.Layers 2.0 ApplicationScreens { Screen { backgroundColor: "#41CD52" ItemLayer { anchors.centerIn: parent depth: ItemLayer.Bpp32Alpha width: textPrimary.width height: textPrimary.height Rectangle { anchors.fill: parent color: "#41CD52" } Column { id: textPrimary anchors.centerIn: parent spacing: 5 Text { anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 30 text: "Qt for MCUs" } Text { anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 20 text: "first screen" } } } } Screen { backgroundColor: "#41CD52" ItemLayer { z: 1 anchors.centerIn: parent depth: ItemLayer.Bpp32Alpha width: textSecondary.width height: textSecondary.height Rectangle { anchors.fill: parent color: "#41CD52" } Column { id: textSecondary anchors.centerIn: parent spacing: 5 Text { anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 30 text: "Qt for MCUs" } Text { anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 20 text: "second screen" } } } } }