aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml')
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml
new file mode 100644
index 0000000000..0627656ea6
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml
@@ -0,0 +1,39 @@
+import QtQuick 2.10
+
+Item {
+ width: 320
+ height: 480
+
+ property string firstWord: "<p>One,</p><p>Two, "
+ property string secondWord: "Three</p>"
+
+ Text {
+ id: referenceText
+ text: firstWord + secondWord
+ anchors.centerIn: parent
+ font.italic: true
+ font.pixelSize: 30
+ textFormat: Text.RichText
+ }
+
+
+ Text {
+ id: firstWordItemRichText
+ anchors.left: referenceText.left
+ anchors.top: referenceText.bottom
+ text: firstWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+
+ Text {
+ id: secondWordItemRichText
+ anchors.left: firstWordItemRichText.left
+ anchors.leftMargin: firstWordItemRichText.advance.width
+ anchors.baseline: firstWordItemRichText.baseline
+ anchors.baselineOffset: firstWordItemRichText.advance.height
+ text: secondWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+}