This file is indexed.

/usr/share/qt5/doc/qtquick/qml-qtquick-text.html is in qtdeclarative5-doc-html 5.5.1-2ubuntu6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquicktext.cpp -->
  <title>Text QML Type | Qt Quick 5.5</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.5</li>
<li><a href="qtquick-index.html">Qt Quick</a></li>
<li><a href="qtquick-qmlmodule.html">QML Types</a></li>
<li>Text QML Type</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Text QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Text-brief -->
<p>Specifies how to add formatted text to a scene <a href="#details">More...</a></p>
<!-- @@@Text -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtQuick 2.5</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qtquick-item.html">Item</a></p>
</td></tr></table></div><ul>
<li><a href="qml-qtquick-text-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-text.html#baseUrl-prop">baseUrl</a></b></b> : url</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#clip-prop">clip</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#color-prop">color</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#contentHeight-prop">contentHeight</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#contentWidth-prop">contentWidth</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#effectiveHorizontalAlignment-prop">effectiveHorizontalAlignment</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#elide-prop">elide</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.bold-prop">font.bold</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.capitalization-prop">font.capitalization</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.family-prop">font.family</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.italic-prop">font.italic</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.letterSpacing-prop">font.letterSpacing</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.pixelSize-prop">font.pixelSize</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.pointSize-prop">font.pointSize</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.strikeout-prop">font.strikeout</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.underline-prop">font.underline</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.weight-prop">font.weight</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#font.wordSpacing-prop">font.wordSpacing</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#fontSizeMode-prop">fontSizeMode</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#horizontalAlignment-prop">horizontalAlignment</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#hoveredLink-prop">hoveredLink</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#lineCount-prop">lineCount</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#lineHeight-prop">lineHeight</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#lineHeightMode-prop">lineHeightMode</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#linkColor-prop">linkColor</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#maximumLineCount-prop">maximumLineCount</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#minimumPixelSize-prop">minimumPixelSize</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#minimumPointSize-prop">minimumPointSize</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#renderType-prop">renderType</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#style-prop">style</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#styleColor-prop">styleColor</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#text-prop">text</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#textFormat-prop">textFormat</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#truncated-prop">truncated</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#verticalAlignment-prop">verticalAlignment</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#wrapMode-prop">wrapMode</a></b></b> : enumeration</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-text.html#lineLaidOut-signal">lineLaidOut</a></b></b>(object <i> line</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#linkActivated-signal">linkActivated</a></b></b>(string <i> link</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#linkHovered-signal">linkHovered</a></b></b>(string <i> link</i>)</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-text.html#doLayout-method">doLayout</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-text.html#linkAt-method">linkAt</a></b></b>(real <i> x</i>, real <i> y</i>)</li>
</ul>
<!-- $$$Text-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>Text items can display both plain and rich text. For example, red text with a specific font and size can be defined like this:</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
    <span class="name">text</span>: <span class="string">&quot;Hello World!&quot;</span>
    <span class="name">font</span>.family: <span class="string">&quot;Helvetica&quot;</span>
    <span class="name">font</span>.pointSize: <span class="number">24</span>
    <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
}</pre>
<p>Rich text is defined using HTML-style markup:</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
    <span class="name">text</span>: <span class="string">&quot;&lt;b&gt;Hello&lt;/b&gt; &lt;i&gt;World!&lt;/i&gt;&quot;</span>
}</pre>
<p class="centerAlign"><img src="images/declarative-text.png" alt="" /></p><p>If height and width are not explicitly set, Text will attempt to determine how much room is needed and set it accordingly. Unless <a href="qml-qtquick-text.html#wrapMode-prop">wrapMode</a> is set, it will always prefer width to height (all text will be placed on a single line).</p>
<p>The <a href="qml-qtquick-text.html#elide-prop">elide</a> property can alternatively be used to fit a single line of plain text to a set width.</p>
<p>Note that the Supported HTML Subset is limited. Also, if the text contains HTML img tags that load remote images, the text is reloaded.</p>
<p>Text provides read-only text. For editable text, see <a href="qml-qtquick-textedit.html">TextEdit</a>.</p>
<p><b>See also </b><a href="qtquick-text-example.html#fonts">Fonts example</a>.</p>
<!-- @@@Text -->
<h2>Property Documentation</h2>
<!-- $$$baseUrl -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="baseUrl-prop"><td class="tblQmlPropNode"><p><a name="baseUrl-prop"></a><span class="name">baseUrl</span> : <span class="type">url</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property specifies a base URL which is used to resolve relative URLs within the text.</p>
<p>Urls are resolved to be within the same directory as the target of the base URL meaning any portion of the path after the last '/' will be ignored.</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Base URL</th><th >Relative URL</th><th >Resolved URL</th></tr></thead>
<tr valign="top" class="odd"><td >http://qt-project.org/</td><td >images/logo.png</td><td >http://qt-project.org/images/logo.png</td></tr>
<tr valign="top" class="even"><td >http://qt-project.org/index.html</td><td >images/logo.png</td><td >http://qt-project.org/images/logo.png</td></tr>
<tr valign="top" class="odd"><td >http://qt-project.org/content</td><td >images/logo.png</td><td >http://qt-project.org/content/images/logo.png</td></tr>
<tr valign="top" class="even"><td >http://qt-project.org/content/</td><td >images/logo.png</td><td >http://qt-project.org/content/images/logo.png</td></tr>
<tr valign="top" class="odd"><td >http://qt-project.org/content/index.html</td><td >images/logo.png</td><td >http://qt-project.org/content/images/logo.png</td></tr>
<tr valign="top" class="even"><td >http://qt-project.org/content/index.html</td><td >../images/logo.png</td><td >http://qt-project.org/images/logo.png</td></tr>
<tr valign="top" class="odd"><td >http://qt-project.org/content/index.html</td><td >/images/logo.png</td><td >http://qt-project.org/images/logo.png</td></tr>
</table></div>
<p>The default value is the url of the QML file instantiating the Text item.</p>
</div></div><!-- @@@baseUrl -->
<br/>
<!-- $$$clip -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="clip-prop"><td class="tblQmlPropNode"><p><a name="clip-prop"></a><span class="name">clip</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds whether the text is clipped.</p>
<p>Note that if the text does not fit in the bounding rectangle it will be abruptly chopped.</p>
<p>If you want to display potentially long text in a limited space, you probably want to use <code>elide</code> instead.</p>
</div></div><!-- @@@clip -->
<br/>
<!-- $$$color -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="color-prop"><td class="tblQmlPropNode"><p><a name="color-prop"></a><span class="name">color</span> : <span class="type">color</span></p></td></tr></table></div></div><div class="qmldoc"><p>The text color.</p>
<p>An example of green text defined using hexadecimal notation:</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
    <span class="name">color</span>: <span class="string">&quot;#00FF00&quot;</span>
    <span class="name">text</span>: <span class="string">&quot;green text&quot;</span>
}</pre>
<p>An example of steel blue text defined using an SVG color name:</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
    <span class="name">color</span>: <span class="string">&quot;steelblue&quot;</span>
    <span class="name">text</span>: <span class="string">&quot;blue text&quot;</span>
}</pre>
</div></div><!-- @@@color -->
<br/>
<!-- $$$contentHeight -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="contentHeight-prop"><td class="tblQmlPropNode"><p><a name="contentHeight-prop"></a><span class="name">contentHeight</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Returns the height of the text, including height past the height which is covered due to there being more text than fits in the set height.</p>
</div></div><!-- @@@contentHeight -->
<br/>
<!-- $$$contentWidth -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="contentWidth-prop"><td class="tblQmlPropNode"><p><a name="contentWidth-prop"></a><span class="name">contentWidth</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Returns the width of the text, including width past the width which is covered due to insufficient wrapping if WrapMode is set.</p>
</div></div><!-- @@@contentWidth -->
<br/>
<!-- $$$effectiveHorizontalAlignment -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="effectiveHorizontalAlignment-prop"><td class="tblQmlPropNode"><p><a name="effectiveHorizontalAlignment-prop"></a><span class="name">effectiveHorizontalAlignment</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is vertically aligned to the top. Horizontal alignment follows the natural alignment of the text, for example text that is read from left to right will be aligned to the left.</p>
<p>The valid values for <code>horizontalAlignment</code> are <code>Text.AlignLeft</code>, <code>Text.AlignRight</code>, <code>Text.AlignHCenter</code> and <code>Text.AlignJustify</code>. The valid values for <code>verticalAlignment</code> are <code>Text.AlignTop</code>, <code>Text.AlignBottom</code> and <code>Text.AlignVCenter</code>.</p>
<p>Note that for a single line of text, the size of the text is the area of the text. In this common case, all alignments are equivalent. If you want the text to be, say, centered in its parent, then you will need to either modify the <a href="qml-qtquick-item.html#anchors-prop">Item::anchors</a>, or set <a href="qml-qtquick-text.html#horizontalAlignment-prop">horizontalAlignment</a> to Text.AlignHCenter and bind the width to that of the parent.</p>
<p>When using the attached property <a href="qml-qtquick-layoutmirroring.html#enabled-prop">LayoutMirroring::enabled</a> to mirror application layouts, the horizontal alignment of text will also be mirrored. However, the property <code>horizontalAlignment</code> will remain unchanged. To query the effective horizontal alignment of Text, use the read-only property <code>effectiveHorizontalAlignment</code>.</p>
</div></div><!-- @@@effectiveHorizontalAlignment -->
<br/>
<!-- $$$elide -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="elide-prop"><td class="tblQmlPropNode"><p><a name="elide-prop"></a><span class="name">elide</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>Set this property to elide parts of the text fit to the Text item's width. The text will only elide if an explicit width has been set.</p>
<p>This property cannot be used with rich text.</p>
<p>Eliding can be:</p>
<ul>
<li>Text.ElideNone - the default</li>
<li>Text.ElideLeft</li>
<li>Text.ElideMiddle</li>
<li>Text.ElideRight</li>
</ul>
<p>If this property is set to Text.ElideRight, it can be used with <a href="qml-qtquick-text.html#wrapMode-prop">wrapped</a> text. The text will only elide if <code>maximumLineCount</code>, or <code>height</code> has been set. If both <code>maximumLineCount</code> and <code>height</code> are set, <code>maximumLineCount</code> will apply unless the lines do not fit in the height allowed.</p>
<p>If the text is a multi-length string, and the mode is not <code>Text.ElideNone</code>, the first string that fits will be used, otherwise the last will be elided.</p>
<p>Multi-length strings are ordered from longest to shortest, separated by the Unicode &quot;String Terminator&quot; character <code>U009C</code> (write this in QML with <code>&quot;\u009C&quot;</code> or <code>&quot;\x9C&quot;</code>).</p>
</div></div><!-- @@@elide -->
<br/>
<!-- $$$font.bold -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.bold-prop"><td class="tblQmlPropNode"><p><a name="font.bold-prop"></a><span class="name">font.bold</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets whether the font weight is bold.</p>
</div></div><!-- @@@font.bold -->
<br/>
<!-- $$$font.capitalization -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.capitalization-prop"><td class="tblQmlPropNode"><p><a name="font.capitalization-prop"></a><span class="name">font.capitalization</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the capitalization for the text.</p>
<ul>
<li>Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.</li>
<li>Font.AllUppercase - This alters the text to be rendered in all uppercase type.</li>
<li>Font.AllLowercase - This alters the text to be rendered in all lowercase type.</li>
<li>Font.SmallCaps - This alters the text to be rendered in small-caps type.</li>
<li>Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.</li>
</ul>
<pre class="qml"><span class="type"><a href="qml-qtquick-text.html">Text</a></span> { <span class="name">text</span>: <span class="string">&quot;Hello&quot;</span>; <span class="name">font</span>.capitalization: <span class="name">Font</span>.<span class="name">AllLowercase</span> }</pre>
</div></div><!-- @@@font.capitalization -->
<br/>
<!-- $$$font.family -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.family-prop"><td class="tblQmlPropNode"><p><a name="font.family-prop"></a><span class="name">font.family</span> : <span class="type">string</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the family name of the font.</p>
<p>The family name is case insensitive and may optionally include a foundry name, e.g&#x2e; &quot;Helvetica [Cronyx]&quot;. If the family is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen. If the family isn't available a family will be set using the font matching algorithm.</p>
</div></div><!-- @@@font.family -->
<br/>
<!-- $$$font.italic -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.italic-prop"><td class="tblQmlPropNode"><p><a name="font.italic-prop"></a><span class="name">font.italic</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets whether the font has an italic style.</p>
</div></div><!-- @@@font.italic -->
<br/>
<!-- $$$font.letterSpacing -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.letterSpacing-prop"><td class="tblQmlPropNode"><p><a name="font.letterSpacing-prop"></a><span class="name">font.letterSpacing</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the letter spacing for the font.</p>
<p>Letter spacing changes the default spacing between individual letters in the font. A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.</p>
</div></div><!-- @@@font.letterSpacing -->
<br/>
<!-- $$$font.pixelSize -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.pixelSize-prop"><td class="tblQmlPropNode"><p><a name="font.pixelSize-prop"></a><span class="name">font.pixelSize</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the font size in pixels.</p>
<p>Using this function makes the font device dependent. Use <code>pointSize</code> to set the size of the font in a device independent manner.</p>
</div></div><!-- @@@font.pixelSize -->
<br/>
<!-- $$$font.pointSize -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.pointSize-prop"><td class="tblQmlPropNode"><p><a name="font.pointSize-prop"></a><span class="name">font.pointSize</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the font size in points. The point size must be greater than zero.</p>
</div></div><!-- @@@font.pointSize -->
<br/>
<!-- $$$font.strikeout -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.strikeout-prop"><td class="tblQmlPropNode"><p><a name="font.strikeout-prop"></a><span class="name">font.strikeout</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets whether the font has a strikeout style.</p>
</div></div><!-- @@@font.strikeout -->
<br/>
<!-- $$$font.underline -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.underline-prop"><td class="tblQmlPropNode"><p><a name="font.underline-prop"></a><span class="name">font.underline</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets whether the text is underlined.</p>
</div></div><!-- @@@font.underline -->
<br/>
<!-- $$$font.weight -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.weight-prop"><td class="tblQmlPropNode"><p><a name="font.weight-prop"></a><span class="name">font.weight</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the font's weight.</p>
<p>The weight can be one of:</p>
<ul>
<li>Font.Thin</li>
<li>Font.Light</li>
<li>Font.ExtraLight</li>
<li>Font.Normal - the default</li>
<li>Font.Medium</li>
<li>Font.DemiBold</li>
<li>Font.Bold</li>
<li>Font.ExtraBold</li>
<li>Font.Black</li>
</ul>
<pre class="qml"><span class="type"><a href="qml-qtquick-text.html">Text</a></span> { <span class="name">text</span>: <span class="string">&quot;Hello&quot;</span>; <span class="name">font</span>.weight: <span class="name">Font</span>.<span class="name">DemiBold</span> }</pre>
</div></div><!-- @@@font.weight -->
<br/>
<!-- $$$font.wordSpacing -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="font.wordSpacing-prop"><td class="tblQmlPropNode"><p><a name="font.wordSpacing-prop"></a><span class="name">font.wordSpacing</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the word spacing for the font.</p>
<p>Word spacing changes the default spacing between individual words. A positive value increases the word spacing by a corresponding amount of pixels, while a negative value decreases the inter-word spacing accordingly.</p>
</div></div><!-- @@@font.wordSpacing -->
<br/>
<!-- $$$fontSizeMode -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="fontSizeMode-prop"><td class="tblQmlPropNode"><p><a name="fontSizeMode-prop"></a><span class="name">fontSizeMode</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property specifies how the font size of the displayed text is determined. The possible values are:</p>
<ul>
<li>Text.FixedSize (default) - The size specified by <a href="qml-qtquick-text.html#font.pixelSize-prop">font.pixelSize</a> or <a href="qml-qtquick-text.html#font.pointSize-prop">font.pointSize</a> is used.</li>
<li>Text.HorizontalFit - The largest size up to the size specified that fits within the width of the item without wrapping is used.</li>
<li>Text.VerticalFit - The largest size up to the size specified that fits the height of the item is used.</li>
<li>Text.Fit - The largest size up to the size specified that fits within the width and height of the item is used.</li>
</ul>
<p>The font size of fitted text has a minimum bound specified by the <a href="qml-qtquick-text.html#minimumPointSize-prop">minimumPointSize</a> or <a href="qml-qtquick-text.html#minimumPixelSize-prop">minimumPixelSize</a> property and maximum bound specified by either the <a href="qml-qtquick-text.html#font.pointSize-prop">font.pointSize</a> or <a href="qml-qtquick-text.html#font.pixelSize-prop">font.pixelSize</a> properties.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-text.html">Text</a></span> { <span class="name">text</span>: <span class="string">&quot;Hello&quot;</span>; <span class="name">fontSizeMode</span>: <span class="name">Text</span>.<span class="name">Fit</span>; <span class="name">minimumPixelSize</span>: <span class="number">10</span>; <span class="name">font</span>.pixelSize: <span class="number">72</span> }</pre>
<p>If the text does not fit within the item bounds with the minimum font size the text will be elided as per the <a href="qml-qtquick-text.html#elide-prop">elide</a> property.</p>
</div></div><!-- @@@fontSizeMode -->
<br/>
<!-- $$$horizontalAlignment -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="horizontalAlignment-prop"><td class="tblQmlPropNode"><p><a name="horizontalAlignment-prop"></a><span class="name">horizontalAlignment</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is vertically aligned to the top. Horizontal alignment follows the natural alignment of the text, for example text that is read from left to right will be aligned to the left.</p>
<p>The valid values for <code>horizontalAlignment</code> are <code>Text.AlignLeft</code>, <code>Text.AlignRight</code>, <code>Text.AlignHCenter</code> and <code>Text.AlignJustify</code>. The valid values for <code>verticalAlignment</code> are <code>Text.AlignTop</code>, <code>Text.AlignBottom</code> and <code>Text.AlignVCenter</code>.</p>
<p>Note that for a single line of text, the size of the text is the area of the text. In this common case, all alignments are equivalent. If you want the text to be, say, centered in its parent, then you will need to either modify the <a href="qml-qtquick-item.html#anchors-prop">Item::anchors</a>, or set horizontalAlignment to Text.AlignHCenter and bind the width to that of the parent.</p>
<p>When using the attached property <a href="qml-qtquick-layoutmirroring.html#enabled-prop">LayoutMirroring::enabled</a> to mirror application layouts, the horizontal alignment of text will also be mirrored. However, the property <code>horizontalAlignment</code> will remain unchanged. To query the effective horizontal alignment of Text, use the read-only property <code>effectiveHorizontalAlignment</code>.</p>
</div></div><!-- @@@horizontalAlignment -->
<br/>
<!-- $$$hoveredLink -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="hoveredLink-prop"><td class="tblQmlPropNode"><p><a name="hoveredLink-prop"></a><span class="name">hoveredLink</span> : <span class="type">string</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property contains the link string when the user hovers a link embedded in the text. The link must be in rich text or HTML format and the <i>hoveredLink</i> string provides access to the particular link.</p>
<p>This QML property was introduced in  Qt 5.2.</p>
<p><b>See also </b><a href="qml-qtquick-text.html#linkHovered-signal">linkHovered</a> and <a href="qml-qtquick-text.html#linkAt-method">linkAt()</a>.</p>
</div></div><!-- @@@hoveredLink -->
<br/>
<!-- $$$lineCount -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="lineCount-prop"><td class="tblQmlPropNode"><p><a name="lineCount-prop"></a><span class="name">lineCount</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>Returns the number of lines visible in the text item.</p>
<p>This property is not supported for rich text.</p>
<p><b>See also </b><a href="qml-qtquick-text.html#maximumLineCount-prop">maximumLineCount</a>.</p>
</div></div><!-- @@@lineCount -->
<br/>
<!-- $$$lineHeight -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="lineHeight-prop"><td class="tblQmlPropNode"><p><a name="lineHeight-prop"></a><span class="name">lineHeight</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the line height for the text. The value can be in pixels or a multiplier depending on <a href="qml-qtquick-text.html#lineHeightMode-prop">lineHeightMode</a>.</p>
<p>The default value is a multiplier of 1.0&#x2e; The line height must be a positive value.</p>
</div></div><!-- @@@lineHeight -->
<br/>
<!-- $$$lineHeightMode -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="lineHeightMode-prop"><td class="tblQmlPropNode"><p><a name="lineHeightMode-prop"></a><span class="name">lineHeightMode</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property determines how the line height is specified. The possible values are:</p>
<ul>
<li>Text.ProportionalHeight (default) - this sets the spacing proportional to the line (as a multiplier). For example, set to 2 for double spacing.</li>
<li>Text.FixedHeight - this sets the line height to a fixed line height (in pixels).</li>
</ul>
</div></div><!-- @@@lineHeightMode -->
<br/>
<!-- $$$linkColor -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="linkColor-prop"><td class="tblQmlPropNode"><p><a name="linkColor-prop"></a><span class="name">linkColor</span> : <span class="type">color</span></p></td></tr></table></div></div><div class="qmldoc"><p>The color of links in the text.</p>
<p>This property works with the StyledText <a href="qml-qtquick-text.html#textFormat-prop">textFormat</a>, but not with RichText. Link color in RichText can be specified by including CSS style tags in the text.</p>
</div></div><!-- @@@linkColor -->
<br/>
<!-- $$$maximumLineCount -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="maximumLineCount-prop"><td class="tblQmlPropNode"><p><a name="maximumLineCount-prop"></a><span class="name">maximumLineCount</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>Set this property to limit the number of lines that the text item will show. If elide is set to Text.ElideRight, the text will be elided appropriately. By default, this is the value of the largest possible integer.</p>
<p>This property is not supported for rich text.</p>
<p><b>See also </b><a href="qml-qtquick-text.html#lineCount-prop">lineCount</a> and <a href="qml-qtquick-text.html#elide-prop">elide</a>.</p>
</div></div><!-- @@@maximumLineCount -->
<br/>
<!-- $$$minimumPixelSize -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="minimumPixelSize-prop"><td class="tblQmlPropNode"><p><a name="minimumPixelSize-prop"></a><span class="name">minimumPixelSize</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property specifies the minimum font pixel size of text scaled by the <a href="qml-qtquick-text.html#fontSizeMode-prop">fontSizeMode</a> property.</p>
<p>If the <a href="qml-qtquick-text.html#fontSizeMode-prop">fontSizeMode</a> is Text.FixedSize or the <a href="qml-qtquick-text.html#font.pixelSize-prop">font.pixelSize</a> is -1 this property is ignored.</p>
</div></div><!-- @@@minimumPixelSize -->
<br/>
<!-- $$$minimumPointSize -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="minimumPointSize-prop"><td class="tblQmlPropNode"><p><a name="minimumPointSize-prop"></a><span class="name">minimumPointSize</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property specifies the minimum font point size of text scaled by the <a href="qml-qtquick-text.html#fontSizeMode-prop">fontSizeMode</a> property.</p>
<p>If the <a href="qml-qtquick-text.html#fontSizeMode-prop">fontSizeMode</a> is Text.FixedSize or the <a href="qml-qtquick-text.html#font.pointSize-prop">font.pointSize</a> is -1 this property is ignored.</p>
</div></div><!-- @@@minimumPointSize -->
<br/>
<!-- $$$renderType -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="renderType-prop"><td class="tblQmlPropNode"><p><a name="renderType-prop"></a><span class="name">renderType</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>Override the default rendering type for this component.</p>
<p>Supported render types are:</p>
<ul>
<li>Text.QtRendering - the default</li>
<li>Text.NativeRendering</li>
</ul>
<p>Select Text.NativeRendering if you prefer text to look native on the target platform and do not require advanced features such as transformation of the text. Using such features in combination with the NativeRendering render type will lend poor and sometimes pixelated results.</p>
</div></div><!-- @@@renderType -->
<br/>
<!-- $$$style -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="style-prop"><td class="tblQmlPropNode"><p><a name="style-prop"></a><span class="name">style</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>Set an additional text style.</p>
<p>Supported text styles are:</p>
<ul>
<li>Text.Normal - the default</li>
<li>Text.Outline</li>
<li>Text.Raised</li>
<li>Text.Sunken</li>
</ul>
<pre class="qml"><span class="type"><a href="qml-qtquick-row.html">Row</a></span> {
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> { <span class="name">font</span>.pointSize: <span class="number">24</span>; <span class="name">text</span>: <span class="string">&quot;Normal&quot;</span> }
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> { <span class="name">font</span>.pointSize: <span class="number">24</span>; <span class="name">text</span>: <span class="string">&quot;Raised&quot;</span>; <span class="name">style</span>: <span class="name">Text</span>.<span class="name">Raised</span>; <span class="name">styleColor</span>: <span class="string">&quot;#AAAAAA&quot;</span> }
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> { <span class="name">font</span>.pointSize: <span class="number">24</span>; <span class="name">text</span>: <span class="string">&quot;Outline&quot;</span>;<span class="name">style</span>: <span class="name">Text</span>.<span class="name">Outline</span>; <span class="name">styleColor</span>: <span class="string">&quot;red&quot;</span> }
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> { <span class="name">font</span>.pointSize: <span class="number">24</span>; <span class="name">text</span>: <span class="string">&quot;Sunken&quot;</span>; <span class="name">style</span>: <span class="name">Text</span>.<span class="name">Sunken</span>; <span class="name">styleColor</span>: <span class="string">&quot;#AAAAAA&quot;</span> }
}</pre>
<p class="centerAlign"><img src="images/declarative-textstyle.png" alt="" /></p></div></div><!-- @@@style -->
<br/>
<!-- $$$styleColor -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="styleColor-prop"><td class="tblQmlPropNode"><p><a name="styleColor-prop"></a><span class="name">styleColor</span> : <span class="type">color</span></p></td></tr></table></div></div><div class="qmldoc"><p>Defines the secondary color used by text styles.</p>
<p><code>styleColor</code> is used as the outline color for outlined text, and as the shadow color for raised or sunken text. If no style has been set, it is not used at all.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-text.html">Text</a></span> { <span class="name">font</span>.pointSize: <span class="number">18</span>; <span class="name">text</span>: <span class="string">&quot;hello&quot;</span>; <span class="name">style</span>: <span class="name">Text</span>.<span class="name">Raised</span>; <span class="name">styleColor</span>: <span class="string">&quot;gray&quot;</span> }</pre>
<p><b>See also </b><a href="qml-qtquick-text.html#style-prop">style</a>.</p>
</div></div><!-- @@@styleColor -->
<br/>
<!-- $$$text -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="text-prop"><td class="tblQmlPropNode"><p><a name="text-prop"></a><span class="name">text</span> : <span class="type">string</span></p></td></tr></table></div></div><div class="qmldoc"><p>The text to display. Text supports both plain and rich text strings.</p>
<p>The item will try to automatically determine whether the text should be treated as styled text. This determination is made using Qt::mightBeRichText().</p>
</div></div><!-- @@@text -->
<br/>
<!-- $$$textFormat -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="textFormat-prop"><td class="tblQmlPropNode"><p><a name="textFormat-prop"></a><span class="name">textFormat</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>The way the text property should be displayed.</p>
<p>Supported text formats are:</p>
<ul>
<li>Text.AutoText (default)</li>
<li>Text.PlainText</li>
<li>Text.StyledText</li>
<li>Text.RichText</li>
</ul>
<p>If the text format is <code>Text.AutoText</code> the Text item will automatically determine whether the text should be treated as styled text. This determination is made using Qt::mightBeRichText() which uses a fast and therefore simple heuristic. It mainly checks whether there is something that looks like a tag before the first line break. Although the result may be correct for common cases, there is no guarantee.</p>
<p>Text.StyledText is an optimized format supporting some basic text styling markup, in the style of HTML 3.2:</p>
<pre class="cpp"><span class="operator">&lt;</span>b<span class="operator">&gt;</span><span class="operator">&lt;</span><span class="operator">/</span>b<span class="operator">&gt;</span> <span class="operator">-</span> bold
<span class="operator">&lt;</span>strong<span class="operator">&gt;</span><span class="operator">&lt;</span><span class="operator">/</span>strong<span class="operator">&gt;</span> <span class="operator">-</span> bold
<span class="operator">&lt;</span>i<span class="operator">&gt;</span><span class="operator">&lt;</span><span class="operator">/</span>i<span class="operator">&gt;</span> <span class="operator">-</span> italic
<span class="operator">&lt;</span>br<span class="operator">&gt;</span> <span class="operator">-</span> <span class="keyword">new</span> line
<span class="operator">&lt;</span>p<span class="operator">&gt;</span> <span class="operator">-</span> paragraph
<span class="operator">&lt;</span>u<span class="operator">&gt;</span> <span class="operator">-</span> underlined text
<span class="operator">&lt;</span>font color<span class="operator">=</span><span class="string">&quot;color_name&quot;</span> size<span class="operator">=</span><span class="string">&quot;1-7&quot;</span><span class="operator">&gt;</span><span class="operator">&lt;</span><span class="operator">/</span>font<span class="operator">&gt;</span>
<span class="operator">&lt;</span>h1<span class="operator">&gt;</span> to <span class="operator">&lt;</span>h6<span class="operator">&gt;</span> <span class="operator">-</span> headers
<span class="operator">&lt;</span>a href<span class="operator">=</span><span class="string">&quot;&quot;</span><span class="operator">&gt;</span> <span class="operator">-</span> anchor
<span class="operator">&lt;</span>img src<span class="operator">=</span><span class="string">&quot;&quot;</span> align<span class="operator">=</span><span class="string">&quot;top,middle,bottom&quot;</span> width<span class="operator">=</span><span class="string">&quot;&quot;</span> height<span class="operator">=</span><span class="string">&quot;&quot;</span><span class="operator">&gt;</span> <span class="operator">-</span> <span class="keyword">inline</span> images
<span class="operator">&lt;</span>ol type<span class="operator">=</span><span class="string">&quot;&quot;</span><span class="operator">&gt;</span><span class="operator">,</span> <span class="operator">&lt;</span>ul type<span class="operator">=</span><span class="string">&quot;&quot;</span><span class="operator">&gt;</span> and <span class="operator">&lt;</span>li<span class="operator">&gt;</span> <span class="operator">-</span> ordered and unordered lists
<span class="operator">&lt;</span>pre<span class="operator">&gt;</span><span class="operator">&lt;</span><span class="operator">/</span>pre<span class="operator">&gt;</span> <span class="operator">-</span> preformatted
<span class="operator">&amp;</span>gt; <span class="operator">&amp;</span>lt; <span class="operator">&amp;</span>amp;</pre>
<p><code>Text.StyledText</code> parser is strict, requiring tags to be correctly nested.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><pre class="qml"><span class="type"><a href="qml-qtquick-column.html">Column</a></span> {
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
        <span class="name">font</span>.pointSize: <span class="number">24</span>
        <span class="name">text</span>: <span class="string">&quot;&lt;b&gt;Hello&lt;/b&gt; &lt;i&gt;World!&lt;/i&gt;&quot;</span>
    }
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
        <span class="name">font</span>.pointSize: <span class="number">24</span>
        <span class="name">textFormat</span>: <span class="name">Text</span>.<span class="name">RichText</span>
        <span class="name">text</span>: <span class="string">&quot;&lt;b&gt;Hello&lt;/b&gt; &lt;i&gt;World!&lt;/i&gt;&quot;</span>
    }
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
        <span class="name">font</span>.pointSize: <span class="number">24</span>
        <span class="name">textFormat</span>: <span class="name">Text</span>.<span class="name">PlainText</span>
        <span class="name">text</span>: <span class="string">&quot;&lt;b&gt;Hello&lt;/b&gt; &lt;i&gt;World!&lt;/i&gt;&quot;</span>
    }
}</pre>
</td><td ><p class="centerAlign"><img src="images/declarative-textformat.png" alt="" /></p></td></tr>
</table></div>
<p>Text.RichText supports a larger subset of HTML 4, as described on the Supported HTML Subset page. You should prefer using Text.PlainText or Text.StyledText instead, as they offer better performance.</p>
</div></div><!-- @@@textFormat -->
<br/>
<!-- $$$truncated -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="truncated-prop"><td class="tblQmlPropNode"><p><a name="truncated-prop"></a><span class="name">truncated</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Returns true if the text has been truncated due to <a href="qml-qtquick-text.html#maximumLineCount-prop">maximumLineCount</a> or <a href="qml-qtquick-text.html#elide-prop">elide</a>.</p>
<p>This property is not supported for rich text.</p>
<p><b>See also </b><a href="qml-qtquick-text.html#maximumLineCount-prop">maximumLineCount</a> and <a href="qml-qtquick-text.html#elide-prop">elide</a>.</p>
</div></div><!-- @@@truncated -->
<br/>
<!-- $$$verticalAlignment -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="verticalAlignment-prop"><td class="tblQmlPropNode"><p><a name="verticalAlignment-prop"></a><span class="name">verticalAlignment</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is vertically aligned to the top. Horizontal alignment follows the natural alignment of the text, for example text that is read from left to right will be aligned to the left.</p>
<p>The valid values for <code>horizontalAlignment</code> are <code>Text.AlignLeft</code>, <code>Text.AlignRight</code>, <code>Text.AlignHCenter</code> and <code>Text.AlignJustify</code>. The valid values for <code>verticalAlignment</code> are <code>Text.AlignTop</code>, <code>Text.AlignBottom</code> and <code>Text.AlignVCenter</code>.</p>
<p>Note that for a single line of text, the size of the text is the area of the text. In this common case, all alignments are equivalent. If you want the text to be, say, centered in its parent, then you will need to either modify the <a href="qml-qtquick-item.html#anchors-prop">Item::anchors</a>, or set <a href="qml-qtquick-text.html#horizontalAlignment-prop">horizontalAlignment</a> to Text.AlignHCenter and bind the width to that of the parent.</p>
<p>When using the attached property <a href="qml-qtquick-layoutmirroring.html#enabled-prop">LayoutMirroring::enabled</a> to mirror application layouts, the horizontal alignment of text will also be mirrored. However, the property <code>horizontalAlignment</code> will remain unchanged. To query the effective horizontal alignment of Text, use the read-only property <code>effectiveHorizontalAlignment</code>.</p>
</div></div><!-- @@@verticalAlignment -->
<br/>
<!-- $$$wrapMode -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="wrapMode-prop"><td class="tblQmlPropNode"><p><a name="wrapMode-prop"></a><span class="name">wrapMode</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>Set this property to wrap the text to the Text item's width. The text will only wrap if an explicit width has been set. wrapMode can be one of:</p>
<ul>
<li>Text.NoWrap (default) - no wrapping will be performed. If the text contains insufficient newlines, then <a href="qml-qtquick-text.html#contentWidth-prop">contentWidth</a> will exceed a set width.</li>
<li>Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, <a href="qml-qtquick-text.html#contentWidth-prop">contentWidth</a> will exceed a set width.</li>
<li>Text.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.</li>
<li>Text.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.</li>
</ul>
</div></div><!-- @@@wrapMode -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$lineLaidOut -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="lineLaidOut-signal"><td class="tblQmlFuncNode"><p><a name="lineLaidOut-signal"></a><span class="name">lineLaidOut</span>(<span class="type">object</span><i> line</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>This signal is emitted for each line of text that is laid out during the layout process. The specified <i>line</i> object provides more details about the line that is currently being laid out.</p>
<p>This gives the opportunity to position and resize a line as it is being laid out. It can for example be used to create columns or lay out text around objects.</p>
<p>The properties of the specified <i>line</i> object are:</p>
<ul>
<li>number (read-only)</li>
<li>x</li>
<li>y</li>
<li>width</li>
<li>height</li>
</ul>
<p>For example, this will move the first 5 lines of a Text item by 100 pixels to the right:</p>
<pre class="cpp">onLineLaidOut: {
    <span class="keyword">if</span> (line<span class="operator">.</span>number <span class="operator">&lt;</span> <span class="number">5</span>) {
        line<span class="operator">.</span>x <span class="operator">=</span> line<span class="operator">.</span>x <span class="operator">+</span> <span class="number">100</span>
        line<span class="operator">.</span>width <span class="operator">=</span> line<span class="operator">.</span>width <span class="operator">-</span> <span class="number">100</span>
    }
}</pre>
<p>The corresponding handler is <code>onLineLaidOut</code>.</p>
</div></div><!-- @@@lineLaidOut -->
<br/>
<!-- $$$linkActivated -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="linkActivated-signal"><td class="tblQmlFuncNode"><p><a name="linkActivated-signal"></a><span class="name">linkActivated</span>(<span class="type">string</span><i> link</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>This signal is emitted when the user clicks on a link embedded in the text. The link must be in rich text or HTML format and the <i>link</i> string provides access to the particular link.</p>
<pre class="qml">    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
            <span class="name">textFormat</span>: <span class="name">Text</span>.<span class="name">RichText</span>
            <span class="name">text</span>: <span class="string">&quot;See the &lt;a href=\&quot;http://qt-project.org\&quot;&gt;Qt Project website&lt;/a&gt;.&quot;</span>
            <span class="name">onLinkActivated</span>: <span class="name">console</span>.<span class="name">log</span>(<span class="name">link</span> <span class="operator">+</span> <span class="string">&quot; link activated&quot;</span>)
    }</pre>
<p>The example code will display the text &quot;See the <a href="http://qt-project.org">Qt Project website</a>.&quot;</p>
<p>Clicking on the highlighted link will output <code>http://qt-project.org link activated</code> to the console.</p>
<p>The corresponding handler is <code>onLinkActivated</code>.</p>
</div></div><!-- @@@linkActivated -->
<br/>
<!-- $$$linkHovered -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="linkHovered-signal"><td class="tblQmlFuncNode"><p><a name="linkHovered-signal"></a><span class="name">linkHovered</span>(<span class="type">string</span><i> link</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>This signal is emitted when the user hovers a link embedded in the text. The link must be in rich text or HTML format and the <i>link</i> string provides access to the particular link.</p>
<p>The corresponding handler is <code>onLinkHovered</code>.</p>
<p>This QML signal was introduced in  Qt 5.2.</p>
<p><b>See also </b><a href="qml-qtquick-text.html#hoveredLink-prop">hoveredLink</a> and <a href="qml-qtquick-text.html#linkAt-method">linkAt()</a>.</p>
</div></div><!-- @@@linkHovered -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$doLayout -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="doLayout-method"><td class="tblQmlFuncNode"><p><a name="doLayout-method"></a><span class="name">doLayout</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>Triggers a re-layout of the displayed text.</p>
</div></div><!-- @@@doLayout -->
<br/>
<!-- $$$linkAt -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="linkAt-method"><td class="tblQmlFuncNode"><p><a name="linkAt-method"></a><span class="name">linkAt</span>(<span class="type">real</span><i> x</i>, <span class="type">real</span><i> y</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Returns the link string at point <i>x</i>, <i>y</i> in content coordinates, or an empty string if no link exists at that point.</p>
<p>This QML method was introduced in  Qt 5.3.</p>
<p><b>See also </b><a href="qml-qtquick-text.html#hoveredLink-prop">hoveredLink</a>.</p>
</div></div><!-- @@@linkAt -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>