On this page

C

Qt Quick Ultralite Safe Renderer QML Types

The Qt Quick Ultralite Safe Renderer module provides QML types that are used for safety-critical items in Qt Quick Ultralite applications. It aims to be compatible with Qt Safe Renderer QML Types.

Using the Module

Qul::SafeRenderer is provided by its own CMake package. Call find_package(QulSafeRenderer) before linking against it.

Link the QML module target(s) which use the Safe Renderer QML items to the Qul::SafeRenderer CMake target.

target_link_libraries(myModule PRIVATE Qul::SafeRenderer)

Add the following import statement to your .qml file:

import QtQuickUltralite.SafeRenderer

To let the qtsafelayouttool scan for Safe Renderer QML items in the applications, set the QUL_QML_MAIN_ITEM target property on the top-level QML component on all application targets which use the Qul::SafeRenderer module, either directly or indirectly.

set_target_properties(app PROPERTIES QUL_QML_MAIN_FILE "path/to/Main.qml")

Define APP_SAFE_RENDERER to enable the Safe Renderer Bitmap (SRB) decoder when using a generated entrypoint.

Add the SRB decoder to the image decoders list when using a custom main:

// ...
#include <qul/imagedecoders/saferendererbitmapdecoder.h>

int main()
{
    Qul::initHardware();

    static SafeRendererBitmapDecoder srbDecoder;
    Qul::Application::addImageDecoder(&srbDecoder);

    Qul::initPlatform();
    Qul::Application app;
    // ...

For more information on safety-critical items in Qt Quick Ultralite applications, see Creating an Qt Quick Ultralite application with safety-critical items.

QML Types

SafeImage

Provides a safety-critical QML image type that can be validated using Qt Safe Renderer's output verification

SafePicture

Provides a safety-critical QML picture type that can be validated using Qt Safe Renderer's output verification

SafeText

Provides a safety-critical QML text type that can be validated using Qt Safe Renderer's output verification

Available under certain Qt licenses.
Find out more.