aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-05-31 12:05:26 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-05-31 12:05:39 +0200
commitdece229a7c2284598c36fb668de766309a6893cf (patch)
tree6e34cfa52416b2f27d2fa0631cf34f8ffd171be4 /tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml
parente2520ff76be49c5aa917741cc6a380fe1549e47d (diff)
parentc158ca8be49a75026e83751dfd825c5bdd63189a (diff)
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Diffstat (limited to 'tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml')
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml
new file mode 100644
index 0000000000..ccab5d8c64
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml
@@ -0,0 +1,55 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ property string firstWord: "Hello "
+ property string secondWord: "World"
+
+ Text {
+ id: referenceText
+ text: firstWord + secondWord
+ anchors.centerIn: parent
+ font.italic: true
+ font.pixelSize: 30
+ }
+
+ Text {
+ id: firstWordItem
+ anchors.left: referenceText.left
+ anchors.top: referenceText.bottom
+ text: firstWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: secondWordItem
+ anchors.left: firstWordItem.left
+ anchors.leftMargin: firstWordItem.advance.width
+ anchors.baseline: firstWordItem.baseline
+ anchors.baselineOffset: firstWordItem.advance.height
+ text: secondWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: firstWordItemRichText
+ anchors.left: referenceText.left
+ anchors.top: secondWordItem.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
+ }
+}