C

ImageLayer QML Type

A layer consisting of a single image. More...

Import Statement: import QtQuickUltralite.Layers .
Since: Qt Quick Ultralite 1.7
Inherits:

Item

Properties

Detailed Description

Defines a layer with a single image source. QUL_INTERNAL_SPLIT_IMAGE_OPTIMIZATION has to be disabled for the provided image.

Image layers can be used to present static image data from flash to the screen, without allocating memory for a dynamic framebuffer.

Example usage:

ImageLayer {
    source: "qrc:/images/background.png"
}

Note: This type is specific to Qt Quick Ultralite. See also the compatibility page.

See also Application, Screen, ItemLayer, SpriteLayer, and Improving performance using hardware layers.

Property Documentation

platformId : int

A unique value to identify the layer to the platform.

For use with platform specific API to set custom layer properties.


renderingHints : enumeration

The rendering optimization hints for the image layer.

The hints are used by the platform layer engine to configure the layer in the most optimal way for the application.

Possible values:

ConstantDescription
LayerBase.OptimizeForSpeedThe layer is optimized for fast rendering
LayerBase.OptimizeForSizeThe layer is optimized for low memory usage

source : image

As the url QML basic type is not supported, there exists an another basic type called image which is the type of the ImageLayer object's source property.

ImageLayer accepts an absolute resource URI, for example "qrc:/images/map.png". The resource must have been compiled with qulrcc to be available.

If a string that is not known at compile-time will be set as a source Qt Quick Ultralite will perform run-time lookup to find the resource handle for the given string.

For example the following code results in runtime lookup:

ImageLayer {
    source: "qrc:/" + "foo.png"
}

A failed lookup resets the source property to an empty state in which nothing is rendered.

Note: Qt Quick Ultralite does not support dynamic resources. Every resource must be registered using the Qt Quick Ultralite resource system.

See also Managing Resources and Assets and Dealing with image resources.


Available under certain Qt licenses.
Find out more.