1. Text {
    2. text: "Hello World!"
    3. font.family: "Helvetica"
    4. font.pointSize: 24
    5. anchors.centerIn: parent //文字居父级盒子的正中
    6. color: "red"
    7. }
    8. //加样式
    9. Text {
    10. text: "<b>Hello</b> <i>World!</i>"
    11. }