StaticText QML Type
Enables optimized drawing of text. More...
|Import Statement:||import QtQuickUltralite.Extras 2.6|
|Since:||Qt Quick Ultralite 1.0|
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. StaticText can not be used for dynamic text.
StaticText items are created by the fontcompiler at the application build-time. The glyph layout information that is included into StaticText data is queried from the applications selected font engine (MCU.Config.fontEngine).
With static font engine the complex Unicode scripts can be rendered using StaticText items only.
A StaticText item offers better performance compared to a Text item when no other optimizations have been applied. This is because StaticText does not need to do all the mentioned font handling operations at run-time, which can be very expensive.
Depending on the underlying hardware and the used optimization techniques, the Text item could outperform StaticText. See Qt Quick Ultralite Performance Guide and Text Rendering and Fonts for various techniques of optimizing Text items drawing performance. The advantage of StaticText items over Text items is that you do not need to rely on RAM resources to enable performance gains.
With static font engine, the Text vs StaticText item performance should be similar when no other optimizations have been applied. This is because Text item works with pre-rasterized set of glyphs and does not support text shaping.
Available under certain Qt licenses.
Find out more.