tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
changeset 30 5dc02b23752f
child 33 3e2da88830cd
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
       
     1 import Qt 4.7
       
     2 
       
     3 Rectangle {
       
     4     id: s; width: 800; height: 1000; color: "lightsteelblue"
       
     5     property string text: "<b>The</b> <i>quick</i> <u>brown</u> <o>fox</o> <big>jumps</big> <small>over</small> <tt>the</tt> <s>lazy</s> <em>dog</em>."
       
     6 
       
     7     Column {
       
     8         spacing: 10
       
     9         Text {
       
    10             text: s.text
       
    11         }
       
    12         Text {
       
    13             text: s.text; font.pixelSize: 18
       
    14         }
       
    15         Text {
       
    16             text: s.text; font.pointSize: 25
       
    17         }
       
    18         Text {
       
    19             text: s.text; color: "red"; smooth: true
       
    20         }
       
    21         Text {
       
    22             text: s.text; font.capitalization: "AllUppercase"
       
    23         }
       
    24         Text {
       
    25             text: s.text; font.underline: true
       
    26         }
       
    27         Text {
       
    28             text: s.text; font.overline: true; smooth: true
       
    29         }
       
    30         Text {
       
    31             text: s.text; font.strikeout: true
       
    32         }
       
    33         Text {
       
    34             text: s.text; font.underline: true; font.overline: true; font.strikeout: true
       
    35         }
       
    36         Text {
       
    37             text: s.text; font.letterSpacing: 200
       
    38         }
       
    39         Text {
       
    40             text: s.text; font.underline: true; font.letterSpacing: 200; font.capitalization: "AllUppercase"; color: "blue"
       
    41         }
       
    42         Text {
       
    43             text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green"
       
    44         }
       
    45         Text {
       
    46             text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"
       
    47         }
       
    48         Text {
       
    49             text: s.text; font.pixelSize: 18; style: Text.Sunken; styleColor: "gray"
       
    50         }
       
    51         Text {
       
    52             text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow"
       
    53         }
       
    54         Text {
       
    55             text: s.text; horizontalAlignment: Text.AlignLeft; width: 800
       
    56         }
       
    57         Text {
       
    58             text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: 800; height: 20
       
    59         }
       
    60         Text {
       
    61             text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: 800; height: 20
       
    62         }
       
    63         Text {
       
    64             text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200
       
    65         }
       
    66         Text {
       
    67             text: s.text; elide: Text.ElideLeft; width: 200
       
    68         }
       
    69         Text {
       
    70             text: s.text; elide: Text.ElideMiddle; width: 200
       
    71         }
       
    72         Text {
       
    73             text: s.text; elide: Text.ElideRight; width: 200
       
    74         }
       
    75         Text {
       
    76             text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap
       
    77         }
       
    78         Text {
       
    79             text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap
       
    80         }
       
    81         Text {
       
    82             text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap
       
    83         }
       
    84         Text {
       
    85             text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere
       
    86         }
       
    87         Text {
       
    88             text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAtWordBoundaryOrAnywhere
       
    89         }
       
    90     }
       
    91 }