C
Qt Quick Ultralite layouts Example
# Copyright (C) 2026 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial
cmake_minimum_required(VERSION 3.21.1)
project(layouts VERSION 0.0.1 LANGUAGES C CXX ASM)
find_package(QulApp)
if(QUL_PLATFORM MATCHES "autosar")
qul_add_library(layouts)
else()
qul_add_executable(layouts)
endif()
qul_add_qml_module(layouts
URI LayoutsApp
QML_FILES
Main.qml
LayoutSelector.qml
LayoutType.qml
GridLayout.qml
RowLayout.qml
ColumnLayout.qml
ColorBox.qml
MultiValueButton.qml
StyledCheckBox.qml
NO_SBOM
)
target_link_libraries(layouts PRIVATE Qul::Layouts Qul::Controls)
# The EK-RA8D1 panel is mounted in portrait, so the framebuffer is rotated.
if(QUL_PLATFORM MATCHES "^ek-ra8d1")
set_target_properties(layouts PROPERTIES
QUL_DISPLAY_ROTATION_ANGLE 90
QUL_SHOW_DESKTOP_PREVIEW_IN_NATURAL_DISPLAY_ORIENTATION false
)
endif()
app_target_setup_os(layouts)
app_target_default_entrypoint(layouts Main MODULE LayoutsApp)
if(NOT CMAKE_CROSSCOMPILING AND NOT WIN32)
add_custom_command(TARGET layouts
COMMAND strip layouts -o layouts.stripped
DEPENDS layouts)
endif()