aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktext/data/lineLayoutFontUpdate.qml
blob: d018e31d299d9348f7ce2d0dd3ed8306edf794a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import QtQuick

Item {
    width: 640
    height: 480

    FontLoader {
        id: fontIcons
        source: "tarzeau_ocr_a.ttf"
    }

    Text {
        id: exampleText
        objectName: "exampleText"
        text: "Example multiline text"
        wrapMode: Text.WordWrap
        width: 100
        onLineLaidOut: (line) => {
            if (line.number < 1) {
                line.x += 40;
                line.width -= 40;
            }
        }
    }
}