C

SafeText QML Type

Provides a QML text type which can be rendered in the Qt Safe Renderer runtime. More...

Import Statement: import Qt.SafeRenderer

Detailed Description

The text can be changed on runtime if runtimeEditable is set to true. The SafeText object communicates the scene position changes to the Safe Renderer runtime. For that purpose, a unique objectName property must be set.

Note: SafeText is not rendered properly if the font size is longer than 175.

The following code provides an example of the SafeText type:

SafeText {
    id: safeText
    objectName: "safeText"
    x: 256
    y: 8
    text: "Safe text.."
    color: "black"
    fillColor: "white"  // optional, but recommended to use fillColor for controlled background color
    font.pixelSize: 12
}

Available under certain Qt licenses.
Find out more.