C

Memory optimization

You can reduce flash and RAM footprints by using one or more of the following optimization features or techniques:

Enabling resource compression

PNG compression

You can store an image with PNG compression by setting ImageFiles.MCU.resourceCompression. The image will be decompressed into the cache when needed. This reduces the size of the binary but adds decompression overhead. See ImageFiles.MCU.resourceCompression for more information about using PNG compression in Qt Quick Ultralite applications.

RLE compression

Unlike images that use ImageFiles.MCU.resourceCompression, RLE images with RGB888RLE, XRGB8888RLE, and ARGB888RLE pixel format, are decoded at runtime. This reduces memory usage considerably, but it does not support transforming (scale, rotate, shear, and perspective) such images.

See Lossless compressed image formats for more information.

Framebuffer size

You can optimize the framebuffer size by choosing lower color-depth and/or single buffering. See Framebuffer Requirements for detailed information about the framebuffer size requirements.

You can also improve performance using the hardware layers if your platform supports it. See Improving performance using hardware layers for more information.

Font quality

The font.quality property allows more fine-grained optimization, by providing hints to render low-quality glyphs. You can set the font quality in QML to Font.QualityVeryLow, which saves memory consumed by those glyphs. See MCU.Config.defaultFontQuality for more information.

Omitting source language strings from translations

In some use cases, the source language strings of translations are not rendered at all. Especially when using ID-based translations, the application is not expected to display the source strings. Use the TranslationFiles.MCU.omitSourceLanguage QmlProject property to exclude the source strings from your application binary.

Available under certain Qt licenses.
Find out more.