C
Qt Quick Ultralite layers Example
# Copyright (C) 2026 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial
cmake_minimum_required(VERSION 3.21.1)
project(layers VERSION 0.0.1 LANGUAGES C CXX ASM)
find_package(QulApp)
if(QUL_PLATFORM MATCHES "autosar")
qul_add_library(layers)
else()
qul_add_executable(layers)
endif()
set_source_files_properties(background-big.png PROPERTIES
QUL_RESOURCE_IMAGE_PIXEL_FORMAT "RGB565"
)
# TRAVEO T2G composes the background from a hardware layer, so it is drawn
# straight from flash rather than going through the resource cache.
if(QUL_PLATFORM MATCHES "^tviic2d")
set_source_files_properties(background-big.png PROPERTIES
QUL_RESOURCE_CACHE_POLICY "NoCaching"
)
endif()
qul_add_qml_module(layers
URI LayersApp
QML_FILES
layers.qml
AnimatingItemLayer.qml
MovingImageLayer.qml
RESOURCES
background-big.png
qt-logo.png
)
app_target_setup_os(layers)
app_target_default_entrypoint(layers layers MODULE LayersApp)