Debian Codegraph @

tests/manual/render-qml-to-texture/TextRectangle.qml

raw
1 // Copyright (C) 2017 The Qt Company Ltd.
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4 import QtQuick 2.0
5
6 Rectangle {
7 id: rectangle
8 property string myText: "The quick brown fox jumps over the lazy dog."
9 x: 352
10 y: 272
11 width: 320
12 height: 480
13 color: "steelblue"
14
15 FontLoader { id: fixedFont; name: "Courier" }
16
17 Column {
18 anchors { fill: parent; leftMargin: 10; rightMargin: 10; topMargin: 10 }
19 spacing: 15
20
21 Text {
22 text: rectangle.myText
23 color: "lightsteelblue"
24 width: parent.width
25 wrapMode: Text.WordWrap
26 font.family: "Times"
27 font.pixelSize: 20
28 }
29 Text {
30 text: rectangle.myText
31 color: "lightsteelblue"
32 width: parent.width
33 wrapMode: Text.WordWrap
34 horizontalAlignment: Text.AlignHCenter
35 font { family: "Times"; pixelSize: 20; capitalization: Font.AllUppercase }
36 }
37 Text {
38 text: rectangle.myText
39 color: "lightsteelblue"
40 width: parent.width
41 horizontalAlignment: Text.AlignRight
42 wrapMode: Text.WordWrap
43 font { family: fixedFont.name; pixelSize: 20; weight: Font.Bold; capitalization: Font.AllLowercase }
44 }
45 Text {
46 text: rectangle.myText
47 color: "lightsteelblue"
48 width: parent.width
49 wrapMode: Text.WordWrap
50 font { family: fixedFont.name; pixelSize: 20; italic: true; capitalization: Font.SmallCaps }
51 }
52 }
53 }