C

StaticText QML Type

More efficient version of Text QML type. More...

Import Statement: import QtQuickUltralite.Extras dev.0
Since: Qt Quick Ultralite 1.0

Detailed Description

StaticText in most ways, behaves like Text and has the same properties as Text, except the differences that are documented on this page.

Text that is displayed using the StaticText type is always shaped and rasterized at application build-time. It does not rely on calling any of the font engine APIs at run-time.

To be able to prepare the text at the application build-time, StaticText requires the text property to be fixed and known at compile-time. It must be either a string literal, or a translated literal like qsTr("text"). And it supports only constant font configurations for the same reason. This implies that StaticText can not be used for dynamic text.

StaticText item will provide great performance boost compared to Text item, because it does not need to do all the mentioned font handling operations, which can be very expensive.

Note: With static font engine, the Text vs StaticText item performance should be similar, as Text item works with pre-rasterized set of glyphs and does not support text shaping.

See QUL_GLYPHS_RESOURCE_CACHE_POLICY, QUL_GLYPHS_RESOURCE_STORAGE_SECTION, and QUL_GLYPHS_RESOURCE_RUNTIME_ALLOCATION_TYPE for more information about configuring the run-time storage of StaticText glyphs.

See also Text Rendering and Fonts, Text QML Type, and Text.

Available under certain Qt licenses.
Find out more.