blob: 86b528f0a4cd8a5df5fe4281eb0329f51995275b (
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
26
27
28
29
30
31
32
33
34
35
|
import QtQuick 2.0
Item {
width: 320
height: 480
Text {
id: implicitSizedText
textFormat: Text.RichText
text: "<center>Implicit size<br>----- Second line -----</center>"
anchors.centerIn: parent
color: "white"
Rectangle {
anchors.fill: parent
z: -1
color: "blue"
}
}
Text {
textFormat: Text.RichText
text: "<center>Explicit size<br>----- Second line -----</center>"
anchors.top: implicitSizedText.bottom
anchors.topMargin: 10
anchors.horizontalCenter: parent.horizontalCenter
width: 300
color: "white"
Rectangle {
anchors.fill: parent
z: -1
color: "blue"
}
}
}
|