diff options
Diffstat (limited to 'examples/quick/text/styledtext-layout.qml')
-rw-r--r-- | examples/quick/text/styledtext-layout.qml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/quick/text/styledtext-layout.qml b/examples/quick/text/styledtext-layout.qml index fe7b40b89b..631a37b493 100644 --- a/examples/quick/text/styledtext-layout.qml +++ b/examples/quick/text/styledtext-layout.qml @@ -78,8 +78,27 @@ Rectangle { line.y -= height - margin line.x = width / 2 + margin } + + if (line.isLast) { + lastLineMarker.x = line.x + line.implicitWidth + lastLineMarker.y = line.y + (line.height - lastLineMarker.height) / 2 + } } //! [layout] + + Rectangle { + id: lastLineMarker + color: "#44cccccc" + width: theEndText.width + margin + height: theEndText.height + margin + + Text { + id: theEndText + text: "THE\nEND" + anchors.centerIn: parent + font.pixelSize: myText.font.pixelSize / 2 + } + } } } |