This file is indexed.

/usr/share/qt5/doc/qtquick/qml-qtquick-item.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
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickitem.cpp -->
  <title>Item 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>Item 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="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#item-layers">Item Layers</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Item QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Item-brief -->
<p>A basic visual QML type <a href="#details">More...</a></p>
<!-- @@@Item -->
<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"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="qml-qtquick-item.html"><a href="qquickitem.html">QQuickItem</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qtquick-animatedsprite.html">AnimatedSprite</a>, <a href="qml-qtquick-borderimage.html">BorderImage</a>, <a href="qml-qtquick-canvas.html">Canvas</a>, <a href="qml-qtquick-column.html">Column</a>, <a href="qml-qtquick-flickable.html">Flickable</a>, <a href="qml-qtquick-flipable.html">Flipable</a>, <a href="qml-qtquick-flow.html">Flow</a>, <a href="qml-qtquick-focusscope.html">FocusScope</a>, <a href="qml-qtquick-grid.html">Grid</a>, <a href="qml-qtquick-image.html">Image</a>, <a href="qml-qtquick-loader.html">Loader</a>, <a href="qml-qtquick-mousearea.html">MouseArea</a>, <a href="qml-qtquick-multipointtoucharea.html">MultiPointTouchArea</a>, <a href="qml-qtquick-particles-particlepainter.html">ParticlePainter</a>, <a href="qml-qtquick-pathview.html">PathView</a>, <a href="qml-qtquick-pincharea.html">PinchArea</a>, <a href="qml-qtquick-rectangle.html">Rectangle</a>, <a href="qml-qtquick-repeater.html">Repeater</a>, <a href="qml-qtquick-row.html">Row</a>, <a href="qml-qtquick-shadereffect.html">ShaderEffect</a>, <a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>, <a href="qml-qttest-signalspy.html">SignalSpy</a>, <a href="qml-qtquick-spritesequence.html">SpriteSequence</a>, <a href="qml-qttest-testcase.html">TestCase</a>, <a href="qml-qtquick-text.html">Text</a>, <a href="qml-qtquick-textedit.html">TextEdit</a>, and <a href="qml-qtquick-textinput.html">TextInput</a></p>
</td></tr></table></div><ul>
<li><a href="qml-qtquick-item-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-item.html#activeFocus-prop">activeFocus</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#activeFocusOnTab-prop">activeFocusOnTab</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors-prop">anchors</a></b></b><ul>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.top-prop">anchors.top</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.bottom-prop">anchors.bottom</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.left-prop">anchors.left</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.right-prop">anchors.right</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.horizontalCenter-prop">anchors.horizontalCenter</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.verticalCenter-prop">anchors.verticalCenter</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.baseline-prop">anchors.baseline</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.fill-prop">anchors.fill</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.centerIn-prop">anchors.centerIn</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.margins-prop">anchors.margins</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.topMargin-prop">anchors.topMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.bottomMargin-prop">anchors.bottomMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.leftMargin-prop">anchors.leftMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.rightMargin-prop">anchors.rightMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.horizontalCenterOffset-prop">anchors.horizontalCenterOffset</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.verticalCenterOffset-prop">anchors.verticalCenterOffset</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.baselineOffset-prop">anchors.baselineOffset</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.alignWhenCentered-prop">anchors.alignWhenCentered</a></b></b> : bool</li>
</ul>
</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#antialiasing-prop">antialiasing</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#baselineOffset-prop">baselineOffset</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#children-prop">children</a></b></b> : list&lt;Item&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect-prop">childrenRect</a></b></b><ul>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect.x-prop">childrenRect.x</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect.y-prop">childrenRect.y</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect.width-prop">childrenRect.width</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect.height-prop">childrenRect.height</a></b></b> : real</li>
</ul>
</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#clip-prop">clip</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#data-prop">data</a></b></b> : list&lt;Object&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#enabled-prop">enabled</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#focus-prop">focus</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#height-prop">height</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#implicitHeight-prop">implicitHeight</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#implicitWidth-prop">implicitWidth</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.effect-prop">layer.effect</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.enabled-prop">layer.enabled</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.format-prop">layer.format</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.mipmap-prop">layer.mipmap</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.samplerName-prop">layer.samplerName</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.smooth-prop">layer.smooth</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.sourceRect-prop">layer.sourceRect</a></b></b> : rect</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.textureSize-prop">layer.textureSize</a></b></b> : size</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.wrapMode-prop">layer.wrapMode</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#opacity-prop">opacity</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#parent-prop">parent</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#resources-prop">resources</a></b></b> : list&lt;Object&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#rotation-prop">rotation</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#scale-prop">scale</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#smooth-prop">smooth</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#state-prop">state</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#states-prop">states</a></b></b> : list&lt;State&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#transform-prop">transform</a></b></b> : list&lt;Transform&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#transitions-prop">transitions</a></b></b> : list&lt;Transition&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#visible-prop">visible</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#visibleChildren-prop">visibleChildren</a></b></b> : list&lt;Item&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#width-prop">width</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#x-prop">x</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#y-prop">y</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#z-prop">z</a></b></b> : real</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childAt-method">childAt</a></b></b>(real <i> x</i>, real <i> y</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#contains-method">contains</a></b></b>(point <i> point</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#forceActiveFocus-method-2">forceActiveFocus</a></b></b>(Qt::FocusReason <i> reason</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#forceActiveFocus-method">forceActiveFocus</a></b></b>()</li>
<li class="fn">bool <b><b><a href="qml-qtquick-item.html#grabToImage-method">grabToImage</a></b></b>(callback, targetSize)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapFromItem-method-2">mapFromItem</a></b></b>(Item <i> item</i>, real <i> x</i>, real <i> y</i>, real <i> width</i>, real <i> height</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapFromItem-method">mapFromItem</a></b></b>(Item <i> item</i>, real <i> x</i>, real <i> y</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapToItem-method-2">mapToItem</a></b></b>(Item <i> item</i>, real <i> x</i>, real <i> y</i>, real <i> width</i>, real <i> height</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapToItem-method">mapToItem</a></b></b>(Item <i> item</i>, real <i> x</i>, real <i> y</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#nextItemInFocusChain-method">nextItemInFocusChain</a></b></b>(bool <i> forward</i>)</li>
</ul>
<!-- $$$Item-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>The Item type is the base type for all visual items in Qt Quick.</p>
<p>All visual items in Qt Quick inherit from Item. Although an Item object has no visual appearance, it defines all the attributes that are common across visual items, such as x and y position, width and height, <a href="qtquick-positioning-anchors.html">anchoring</a> and key handling support.</p>
<p>The Item type can be useful for grouping several items under a single root visual item. For example:</p>
<pre class="qml">import QtQuick 2.0

<span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-image.html">Image</a></span> {
        <span class="name">source</span>: <span class="string">&quot;tile.png&quot;</span>
    }
    <span class="type"><a href="qml-qtquick-image.html">Image</a></span> {
        <span class="name">x</span>: <span class="number">80</span>
        <span class="name">width</span>: <span class="number">100</span>
        <span class="name">height</span>: <span class="number">100</span>
        <span class="name">source</span>: <span class="string">&quot;tile.png&quot;</span>
    }
    <span class="type"><a href="qml-qtquick-image.html">Image</a></span> {
        <span class="name">x</span>: <span class="number">190</span>
        <span class="name">width</span>: <span class="number">100</span>
        <span class="name">height</span>: <span class="number">100</span>
        <span class="name">fillMode</span>: <span class="name">Image</span>.<span class="name">Tile</span>
        <span class="name">source</span>: <span class="string">&quot;tile.png&quot;</span>
    }
}</pre>
<a name="key-handling"></a>
<h3 >Key Handling</h3>
<p>Key handling is available to all Item-based visual types via the <a href="qml-qtquick-keys.html">Keys</a> attached property. The <i>Keys</i> attached property provides basic signals such as <a href="qml-qtquick-keys.html#pressed-signal">pressed</a> and <a href="qml-qtquick-keys.html#released-signal">released</a>, as well as signals for specific keys, such as <a href="qml-qtquick-keys.html#spacePressed-signal">spacePressed</a>. The example below assigns <a href="qtquick-input-focus.html">keyboard focus</a> to the item and handles the left key via the general <code>onPressed</code> handler and the return key via the <code>onReturnPressed</code> handler:</p>
<pre class="qml">import QtQuick 2.0

<span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="name">focus</span>: <span class="number">true</span>
    <span class="name">Keys</span>.onPressed: {
        <span class="keyword">if</span> (<span class="name">event</span>.<span class="name">key</span> <span class="operator">==</span> <span class="name">Qt</span>.<span class="name">Key_Left</span>) {
            <span class="name">console</span>.<span class="name">log</span>(<span class="string">&quot;move left&quot;</span>);
            <span class="name">event</span>.<span class="name">accepted</span> <span class="operator">=</span> <span class="number">true</span>;
        }
    }
    <span class="name">Keys</span>.onReturnPressed: <span class="name">console</span>.<span class="name">log</span>(<span class="string">&quot;Pressed return&quot;</span>);
}</pre>
<p>See the <a href="qml-qtquick-keys.html">Keys</a> attached property for detailed documentation.</p>
<a name="layout-mirroring"></a>
<h3 >Layout Mirroring</h3>
<p>Item layouts can be mirrored using the <a href="qml-qtquick-layoutmirroring.html">LayoutMirroring</a> attached property. This causes <a href="qml-qtquick-item.html#anchors.top-prop">anchors</a> to be horizontally reversed, and also causes items that lay out or position their children (such as <a href="qml-qtquick-listview.html">ListView</a> or <a href="qtquick-positioning-layouts.html#row">Row</a>) to horizontally reverse the direction of their layouts.</p>
<p>See <a href="qml-qtquick-layoutmirroring.html">LayoutMirroring</a> for more details.</p>
<a name="item-layers"></a>
<h2 id="item-layers">Item Layers</h2>
<p>An Item will normally be rendered directly into the window it belongs to. However, by setting <a href="qml-qtquick-item.html#layer.enabled-prop">layer.enabled</a>, it is possible to delegate the item and its entire subtree into an offscreen surface. Only the offscreen surface, a texture, will be then drawn into the window.</p>
<p>If it is desired to have a texture size different from that of the item, this is possible using <a href="qml-qtquick-item.html#layer.textureSize-prop">layer.textureSize</a>. To render only a section of the item into the texture, use <a href="qml-qtquick-item.html#layer.sourceRect-prop">layer.sourceRect</a>. It is also possible to specify <a href="qml-qtquick-item.html#layer.sourceRect-prop">layer.sourceRect</a> so it extends beyond the bounds of the item. In this case, the exterior will be padded with transparent pixels.</p>
<p>The item will use linear interpolation for scaling if <a href="qml-qtquick-item.html#layer.smooth-prop">layer.smooth</a> is set to <code>true</code> and will use mipmap for downsampling if <a href="qml-qtquick-item.html#layer.mipmap-prop">layer.mipmap</a> is set to <code>true</code>. Mipmapping may improve visual quality of downscaled items. For mipmapping of single Image items, prefer <a href="qml-qtquick-image.html#mipmap-prop">Image::mipmap</a>.</p>
<a name="layer-opacity-vs-item-opacity"></a>
<h3 >Layer Opacity vs Item Opacity</h3>
<p>When applying <a href="qtquick-effects-topic.html#opacity">opacity</a> to an item hierarchy the opacity is applied to each item individually. This can lead to undesired visual results when the opacity is applied to a subtree. Consider the following example:</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/qml-blending-nonlayered.png" alt="" /></td><td ><b>Non-layered Opacity</b><pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="name">id</span>: <span class="name">nonLayered</span>

    <span class="name">opacity</span>: <span class="number">0.5</span>

    <span class="name">width</span>: <span class="number">100</span>
    <span class="name">height</span>: <span class="number">100</span>

    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> { <span class="name">width</span>: <span class="number">80</span>; <span class="name">height</span>: <span class="number">80</span>; <span class="name">border</span>.width: <span class="number">1</span> }
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> { <span class="name">x</span>: <span class="number">20</span>; <span class="name">y</span>: <span class="number">20</span>; <span class="name">width</span>: <span class="number">80</span>; <span class="name">height</span>: <span class="number">80</span>; <span class="name">border</span>.width: <span class="number">1</span> }
}</pre>
</td></tr>
</table></div>
<p>A layer is rendered with the root item's opacity being 1, and then the root item's opacity is applied to the texture when it is drawn. This means that fading in a large item hierarchy from transparent to opaque, or vice versa, can be done without the overlap artifacts that the normal item by item alpha blending has. Here is the same example with layer enabled:</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/qml-blending-layered.png" alt="" /></p></td><td ><b>Layered Opacity</b><pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="name">id</span>: <span class="name">layered</span>

    <span class="name">opacity</span>: <span class="number">0.5</span>

    <span class="name">layer</span>.enabled: <span class="number">true</span>

    <span class="name">width</span>: <span class="number">100</span>
    <span class="name">height</span>: <span class="number">100</span>

    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> { <span class="name">width</span>: <span class="number">80</span>; <span class="name">height</span>: <span class="number">80</span>; <span class="name">border</span>.width: <span class="number">1</span> }
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> { <span class="name">x</span>: <span class="number">20</span>; <span class="name">y</span>: <span class="number">20</span>; <span class="name">width</span>: <span class="number">80</span>; <span class="name">height</span>: <span class="number">80</span>; <span class="name">border</span>.width: <span class="number">1</span> }
}</pre>
</td></tr>
</table></div>
<a name="combined-with-shadereffects"></a>
<h3 >Combined with ShaderEffects</h3>
<p>Setting <a href="qml-qtquick-item.html#layer.enabled-prop">layer.enabled</a> to true will turn the item into a <a href="qquickitem.html#isTextureProvider">texture provider</a>, making it possible to use the item directly as a texture, for instance in combination with the <a href="qml-qtquick-shadereffect.html">ShaderEffect</a> type.</p>
<p>It is possible to apply an effect on a layer at runtime using layer.effect:</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="name">id</span>: <span class="name">layerRoot</span>
    <span class="name">layer</span>.enabled: <span class="number">true</span>
    <span class="name">layer</span>.effect: <span class="name">ShaderEffect</span> {
        <span class="name">fragmentShader</span>: <span class="string">&quot;
            uniform lowp sampler2D source; // this item
            uniform lowp float qt_Opacity; // inherited opacity of this item
            varying highp vec2 qt_TexCoord0;
            void main() {
                lowp vec4 p = texture2D(source, qt_TexCoord0);
                lowp float g = dot(p.xyz, vec3(0.344, 0.5, 0.156));
                gl_FragColor = vec4(g, g, g, p.a) * qt_Opacity;
            }&quot;</span>
    }</pre>
<p>In this example, we implement the shader effect manually. The Qt Graphical Effects module contains a suite of ready-made effects for use with Qt Quick.</p>
<p>See <a href="qml-qtquick-shadereffect.html">ShaderEffect</a> for more information about using effects.</p>
<p><b>Note: </b><a href="qml-qtquick-item.html#layer.enabled-prop">layer.enabled</a> is actually just a more convenient way of using <a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.</p><a name="memory-and-performance"></a>
<h3 >Memory and Performance</h3>
<p>When an item's layer is enabled, the scene graph will allocate memory in the GPU equal to <code>width x height x 4</code>. In memory constrained configurations, large layers should be used with care.</p>
<p>In the QPainter / QWidget world, it is some times favorable to cache complex content in a pixmap, image or texture. In Qt Quick, because of the techniques already applied by the <a href="qtquick-visualcanvas-scenegraph-renderer.html">scene graph renderer</a>, this will in most cases not be the case. Excessive draw calls are already reduced because of batching and a cache will in most cases end up blending more pixels than the original content. The overhead of rendering to an offscreen and the blending involved with drawing the resulting texture is therefore often more costly than simply letting the item and its children be drawn normally.</p>
<p>Also, an item using a layer can not be <a href="qtquick-visualcanvas-scenegraph-renderer.html#batching">batched</a> during rendering. This means that a scene with many layered items may have performance problems.</p>
<p>Layering can be convenient and useful for visual effects, but should in most cases be enabled for the duration of the effect and disabled afterwards.</p>
<!-- @@@Item -->
<h2>Property Documentation</h2>
<!-- $$$activeFocus -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="activeFocus-prop"><td class="tblQmlPropNode"><p><a name="activeFocus-prop"></a><span class="name">activeFocus</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This read-only property indicates whether the item has active focus.</p>
<p>If activeFocus is true, either this item is the one that currently receives keyboard input, or it is a <a href="qml-qtquick-focusscope.html">FocusScope</a> ancestor of the item that currently receives keyboard input.</p>
<p>Usually, activeFocus is gained by setting <a href="qml-qtquick-item.html#focus-prop">focus</a> on an item and its enclosing <a href="qml-qtquick-focusscope.html">FocusScope</a> objects. In the following example, the <code>input</code> and <code>focusScope</code> objects will have active focus, while the root rectangle object will not.</p>
<pre class="qml">import QtQuick 2.0

<span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
    <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>

    <span class="type"><a href="qml-qtquick-focusscope.html">FocusScope</a></span> {
        <span class="name">id</span>: <span class="name">focusScope</span>
        <span class="name">focus</span>: <span class="number">true</span>

        <span class="type"><a href="qml-qtquick-textinput.html">TextInput</a></span> {
            <span class="name">id</span>: <span class="name">input</span>
            <span class="name">focus</span>: <span class="number">true</span>
        }
    }
}</pre>
<p><b>See also </b><a href="qml-qtquick-item.html#focus-prop">focus</a> and <a href="qtquick-input-focus.html">Keyboard Focus in Qt Quick</a>.</p>
</div></div><!-- @@@activeFocus -->
<br/>
<!-- $$$activeFocusOnTab -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="activeFocusOnTab-prop"><td class="tblQmlPropNode"><p><a name="activeFocusOnTab-prop"></a><span class="name">activeFocusOnTab</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds whether the item wants to be in tab focus chain. By default this is set to false.</p>
<p>The tab focus chain traverses elements by visiting first the parent, and then its children in the order they occur in the children property. Pressing the tab key on an item in the tab focus chain will move keyboard focus to the next item in the chain. Pressing BackTab (normally Shift+Tab) will move focus to the previous item.</p>
<p>To set up a manual tab focus chain, see <a href="qml-qtquick-keynavigation.html">KeyNavigation</a>. Tab key events used by Keys or <a href="qml-qtquick-keynavigation.html">KeyNavigation</a> have precedence over focus chain behavior, ignore the events in other key handlers to allow it to propagate.</p>
</div></div><!-- @@@activeFocusOnTab -->
<br/>
<!-- $$$anchors -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="even" id="anchors-prop"><th class="centerAlign"><p><a name="anchors-prop"></a><b>anchors group</b></p></th></tr><tr valign="top" class="odd" id="anchors.top-prop"><td class="tblQmlPropNode"><p><a name="anchors.top-prop"></a><span class="name">anchors.top</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.bottom-prop"><td class="tblQmlPropNode"><p><a name="anchors.bottom-prop"></a><span class="name">anchors.bottom</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.left-prop"><td class="tblQmlPropNode"><p><a name="anchors.left-prop"></a><span class="name">anchors.left</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.right-prop"><td class="tblQmlPropNode"><p><a name="anchors.right-prop"></a><span class="name">anchors.right</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.horizontalCenter-prop"><td class="tblQmlPropNode"><p><a name="anchors.horizontalCenter-prop"></a><span class="name">anchors.horizontalCenter</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.verticalCenter-prop"><td class="tblQmlPropNode"><p><a name="anchors.verticalCenter-prop"></a><span class="name">anchors.verticalCenter</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.baseline-prop"><td class="tblQmlPropNode"><p><a name="anchors.baseline-prop"></a><span class="name">anchors.baseline</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.fill-prop"><td class="tblQmlPropNode"><p><a name="anchors.fill-prop"></a><span class="name">anchors.fill</span> : <span class="type"><a href="qml-qtquick-item.html">Item</a></span></p></td></tr><tr valign="top" class="odd" id="anchors.centerIn-prop"><td class="tblQmlPropNode"><p><a name="anchors.centerIn-prop"></a><span class="name">anchors.centerIn</span> : <span class="type"><a href="qml-qtquick-item.html">Item</a></span></p></td></tr><tr valign="top" class="odd" id="anchors.margins-prop"><td class="tblQmlPropNode"><p><a name="anchors.margins-prop"></a><span class="name">anchors.margins</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.topMargin-prop"><td class="tblQmlPropNode"><p><a name="anchors.topMargin-prop"></a><span class="name">anchors.topMargin</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.bottomMargin-prop"><td class="tblQmlPropNode"><p><a name="anchors.bottomMargin-prop"></a><span class="name">anchors.bottomMargin</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.leftMargin-prop"><td class="tblQmlPropNode"><p><a name="anchors.leftMargin-prop"></a><span class="name">anchors.leftMargin</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.rightMargin-prop"><td class="tblQmlPropNode"><p><a name="anchors.rightMargin-prop"></a><span class="name">anchors.rightMargin</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.horizontalCenterOffset-prop"><td class="tblQmlPropNode"><p><a name="anchors.horizontalCenterOffset-prop"></a><span class="name">anchors.horizontalCenterOffset</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.verticalCenterOffset-prop"><td class="tblQmlPropNode"><p><a name="anchors.verticalCenterOffset-prop"></a><span class="name">anchors.verticalCenterOffset</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.baselineOffset-prop"><td class="tblQmlPropNode"><p><a name="anchors.baselineOffset-prop"></a><span class="name">anchors.baselineOffset</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.alignWhenCentered-prop"><td class="tblQmlPropNode"><p><a name="anchors.alignWhenCentered-prop"></a><span class="name">anchors.alignWhenCentered</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Anchors provide a way to position an item by specifying its relationship with other items.</p>
<p>Margins apply to top, bottom, left, right, and fill anchors. The <a href="qml-qtquick-item.html#anchors.margins-prop">anchors.margins</a> property can be used to set all of the various margins at once, to the same value. It will not override a specific margin that has been previously set; to clear an explicit margin set its value to <code>undefined</code>. Note that margins are anchor-specific and are not applied if an item does not use anchors.</p>
<p>Offsets apply for horizontal center, vertical center, and baseline anchors.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-anchors_example.png" alt="" /></p></td><td >Text anchored to Image, horizontally centered and vertically below, with a margin.<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-image.html">Image</a></span> {
        <span class="name">id</span>: <span class="name">pic</span>
        <span class="comment">// ...</span>
    }
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
        <span class="name">id</span>: <span class="name">label</span>
        <span class="name">anchors</span>.horizontalCenter: <span class="name">pic</span>.<span class="name">horizontalCenter</span>
        <span class="name">anchors</span>.top: <span class="name">pic</span>.<span class="name">bottom</span>
        <span class="name">anchors</span>.topMargin: <span class="number">5</span>
        <span class="comment">// ...</span>
    }
}</pre>
</td></tr>
<tr valign="top" class="even"><td ><p class="centerAlign"><img src="images/declarative-anchors_example2.png" alt="" /></p></td><td >Left of Text anchored to right of Image, with a margin. The y property of both defaults to 0.<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-image.html">Image</a></span> {
        <span class="name">id</span>: <span class="name">pic</span>
        <span class="comment">// ...</span>
    }
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
        <span class="name">id</span>: <span class="name">label</span>
        <span class="name">anchors</span>.left: <span class="name">pic</span>.<span class="name">right</span>
        <span class="name">anchors</span>.leftMargin: <span class="number">5</span>
        <span class="comment">// ...</span>
    }
}</pre>
</td></tr>
</table></div>
<p><a href="qml-qtquick-item.html#anchors.fill-prop">anchors.fill</a> provides a convenient way for one item to have the same geometry as another item, and is equivalent to connecting all four directional anchors.</p>
<p>To clear an anchor value, set it to <code>undefined</code>.</p>
<p><a href="qml-qtquick-item.html#anchors.alignWhenCentered-prop">anchors.alignWhenCentered</a> (default <code>true</code>) forces centered anchors to align to a whole pixel; if the item being centered has an odd <a href="qml-qtquick-item.html#width-prop">width</a> or <a href="qml-qtquick-item.html#height-prop">height</a>, the item will be positioned on a whole pixel rather than being placed on a half-pixel. This ensures the item is painted crisply. There are cases where this is not desirable, for example when rotating the item jitters may be apparent as the center is rounded.</p>
<p><b>Note: </b>You can only anchor an item to siblings or a parent.</p><p>For more information see <a href="qtquick-positioning-anchors.html#anchor-layout">Anchor Layouts</a>.</p>
</div></div><!-- @@@anchors -->
<br/>
<!-- $$$antialiasing -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="antialiasing-prop"><td class="tblQmlPropNode"><p><a name="antialiasing-prop"></a><span class="name">antialiasing</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Used by visual elements to decide if the item should use antialiasing or not. In some cases items with antialiasing require more memory and are potentially slower to render (see <a href="qtquick-visualcanvas-scenegraph-renderer.html#antialiasing">Antialiasing</a> for more details).</p>
<p>The default is false, but may be overridden by derived elements.</p>
</div></div><!-- @@@antialiasing -->
<br/>
<!-- $$$baselineOffset -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="baselineOffset-prop"><td class="tblQmlPropNode"><p><a name="baselineOffset-prop"></a><span class="name">baselineOffset</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>Specifies the position of the item's baseline in local coordinates.</p>
<p>The baseline of a <a href="qml-qtquick-text.html">Text</a> item is the imaginary line on which the text sits. Controls containing text usually set their baseline to the baseline of their text.</p>
<p>For non-text items, a default baseline offset of 0 is used.</p>
</div></div><!-- @@@baselineOffset -->
<br/>
<!-- $$$children -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="children-prop"><td class="tblQmlPropNode"><p><a name="children-prop"></a><span class="name">children</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qtquick-item.html">Item</a></span>&gt;</p></td></tr></table></div></div><div class="qmldoc"><p>The children property contains the list of visual children of this item. The resources property contains non-visual resources that you want to reference by name.</p>
<p>It is not generally necessary to refer to these properties when adding child items or resources, as the default <a href="qml-qtquick-item.html#data-prop">data</a> property will automatically assign child objects to the <code>children</code> and <code>resources</code> properties as appropriate. See the <a href="qml-qtquick-item.html#data-prop">data</a> documentation for details.</p>
</div></div><!-- @@@children -->
<br/>
<!-- $$$childrenRect -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="even" id="childrenRect-prop"><th class="centerAlign"><p><a name="childrenRect-prop"></a><b>childrenRect group</b></p></th></tr><tr valign="top" class="odd" id="childrenRect.x-prop"><td class="tblQmlPropNode"><p><a name="childrenRect.x-prop"></a><span class="name">childrenRect.x</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="childrenRect.y-prop"><td class="tblQmlPropNode"><p><a name="childrenRect.y-prop"></a><span class="name">childrenRect.y</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="childrenRect.width-prop"><td class="tblQmlPropNode"><p><a name="childrenRect.width-prop"></a><span class="name">childrenRect.width</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="childrenRect.height-prop"><td class="tblQmlPropNode"><p><a name="childrenRect.height-prop"></a><span class="name">childrenRect.height</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the collective position and size of the item's children.</p>
<p>This property is useful if you need to access the collective geometry of an item's children in order to correctly size the item.</p>
</div></div><!-- @@@childrenRect -->
<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 clipping is enabled. The default clip value is <code>false</code>.</p>
<p>If clipping is enabled, an item will clip its own painting, as well as the painting of its children, to its bounding rectangle.</p>
</div></div><!-- @@@clip -->
<br/>
<!-- $$$data -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="data-prop"><td class="tblQmlPropNode"><p><a name="data-prop"></a><span class="qmldefault">[default] </span><span class="name">data</span> : <span class="type">list</span>&lt;<span class="type">Object</span>&gt;</p></td></tr></table></div></div><div class="qmldoc"><p>The data property allows you to freely mix visual children and resources in an item. If you assign a visual item to the data list it becomes a child and if you assign any other object type, it is added as a resource.</p>
<p>So you can write:</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {}
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {}
    <span class="type">Timer</span> {}
}</pre>
<p>instead of:</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="name">children</span>: [
        <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {},
        <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {}
    ]
    <span class="name">resources</span>: [
        <span class="type">Timer</span> {}
    ]
}</pre>
<p>It should not generally be necessary to refer to the <code>data</code> property, as it is the default property for Item and thus all child items are automatically assigned to this property.</p>
</div></div><!-- @@@data -->
<br/>
<!-- $$$enabled -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="enabled-prop"><td class="tblQmlPropNode"><p><a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds whether the item receives mouse and keyboard events. By default this is true.</p>
<p>Setting this property directly affects the <code>enabled</code> value of child items. When set to <code>false</code>, the <code>enabled</code> values of all child items also become <code>false</code>. When set to <code>true</code>, the <code>enabled</code> values of child items are returned to <code>true</code>, unless they have explicitly been set to <code>false</code>.</p>
<p>Setting this property to <code>false</code> automatically causes <a href="qml-qtquick-item.html#activeFocus-prop">activeFocus</a> to be set to <code>false</code>, and this item will longer receive keyboard events.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#visible-prop">visible</a>.</p>
</div></div><!-- @@@enabled -->
<br/>
<!-- $$$focus -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="focus-prop"><td class="tblQmlPropNode"><p><a name="focus-prop"></a><span class="name">focus</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds whether the item has focus within the enclosing <a href="qml-qtquick-focusscope.html">FocusScope</a>. If true, this item will gain active focus when the enclosing <a href="qml-qtquick-focusscope.html">FocusScope</a> gains active focus.</p>
<p>In the following example, <code>input</code> will be given active focus when <code>scope</code> gains active focus:</p>
<pre class="qml">import QtQuick 2.0

<span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
    <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>

    <span class="type"><a href="qml-qtquick-focusscope.html">FocusScope</a></span> {
        <span class="name">id</span>: <span class="name">scope</span>

        <span class="type"><a href="qml-qtquick-textinput.html">TextInput</a></span> {
            <span class="name">id</span>: <span class="name">input</span>
            <span class="name">focus</span>: <span class="number">true</span>
        }
    }
}</pre>
<p>For the purposes of this property, the scene as a whole is assumed to act like a focus scope. On a practical level, that means the following QML will give active focus to <code>input</code> on startup.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
    <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>

    <span class="type"><a href="qml-qtquick-textinput.html">TextInput</a></span> {
          <span class="name">id</span>: <span class="name">input</span>
          <span class="name">focus</span>: <span class="number">true</span>
    }
}</pre>
<p><b>See also </b><a href="qml-qtquick-item.html#activeFocus-prop">activeFocus</a> and <a href="qtquick-input-focus.html">Keyboard Focus in Qt Quick</a>.</p>
</div></div><!-- @@@focus -->
<br/>
<!-- $$$height -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="height-prop"><td class="tblQmlPropNode"><p><a name="height-prop"></a><span class="name">height</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Defines the item's position and size.</p>
<p>The (x,y) position is relative to the <a href="qml-qtquick-item.html#parent-prop">parent</a>.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> { <span class="name">x</span>: <span class="number">100</span>; <span class="name">y</span>: <span class="number">100</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span> }</pre>
</div></div><!-- @@@height -->
<br/>
<!-- $$$implicitHeight -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="implicitHeight-prop"><td class="tblQmlPropNode"><p><a name="implicitHeight-prop"></a><span class="name">implicitHeight</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Defines the natural width or height of the Item if no <a href="qml-qtquick-item.html#width-prop">width</a> or <a href="qml-qtquick-item.html#height-prop">height</a> is specified.</p>
<p>The default implicit size for most items is 0x0, however some items have an inherent implicit size which cannot be overridden, for example, <a href="qml-qtquick-image.html">Image</a> and <a href="qml-qtquick-text.html">Text</a>.</p>
<p>Setting the implicit size is useful for defining components that have a preferred size based on their content, for example:</p>
<pre class="qml"><span class="comment">// Label.qml</span>
import QtQuick 2.0

<span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    property <span class="type">alias</span> <span class="name">icon</span>: <span class="name">image</span>.<span class="name">source</span>
    property <span class="type">alias</span> <span class="name">label</span>: <span class="name">text</span>.<span class="name">text</span>
    <span class="name">implicitWidth</span>: <span class="name">text</span>.<span class="name">implicitWidth</span> <span class="operator">+</span> <span class="name">image</span>.<span class="name">implicitWidth</span>
    <span class="name">implicitHeight</span>: <span class="name">Math</span>.<span class="name">max</span>(<span class="name">text</span>.<span class="name">implicitHeight</span>, <span class="name">image</span>.<span class="name">implicitHeight</span>)
    <span class="type"><a href="qml-qtquick-image.html">Image</a></span> { <span class="name">id</span>: <span class="name">image</span> }
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
        <span class="name">id</span>: <span class="name">text</span>
        <span class="name">wrapMode</span>: <span class="name">Text</span>.<span class="name">Wrap</span>
        <span class="name">anchors</span>.left: <span class="name">image</span>.<span class="name">right</span>; <span class="name">anchors</span>.right: <span class="name">parent</span>.<span class="name">right</span>
        <span class="name">anchors</span>.verticalCenter: <span class="name">parent</span>.<span class="name">verticalCenter</span>
    }
}</pre>
<p><b>Note: </b>Using <a href="qml-qtquick-item.html#implicitWidth-prop">implicitWidth</a> of <a href="qml-qtquick-text.html">Text</a> or <a href="qml-qtquick-textedit.html">TextEdit</a> and setting the width explicitly incurs a performance penalty as the text must be laid out twice.</p></div></div><!-- @@@implicitHeight -->
<br/>
<!-- $$$implicitWidth -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="implicitWidth-prop"><td class="tblQmlPropNode"><p><a name="implicitWidth-prop"></a><span class="name">implicitWidth</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Defines the natural width or height of the Item if no <a href="qml-qtquick-item.html#width-prop">width</a> or <a href="qml-qtquick-item.html#height-prop">height</a> is specified.</p>
<p>The default implicit size for most items is 0x0, however some items have an inherent implicit size which cannot be overridden, for example, <a href="qml-qtquick-image.html">Image</a> and <a href="qml-qtquick-text.html">Text</a>.</p>
<p>Setting the implicit size is useful for defining components that have a preferred size based on their content, for example:</p>
<pre class="qml"><span class="comment">// Label.qml</span>
import QtQuick 2.0

<span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    property <span class="type">alias</span> <span class="name">icon</span>: <span class="name">image</span>.<span class="name">source</span>
    property <span class="type">alias</span> <span class="name">label</span>: <span class="name">text</span>.<span class="name">text</span>
    <span class="name">implicitWidth</span>: <span class="name">text</span>.<span class="name">implicitWidth</span> <span class="operator">+</span> <span class="name">image</span>.<span class="name">implicitWidth</span>
    <span class="name">implicitHeight</span>: <span class="name">Math</span>.<span class="name">max</span>(<span class="name">text</span>.<span class="name">implicitHeight</span>, <span class="name">image</span>.<span class="name">implicitHeight</span>)
    <span class="type"><a href="qml-qtquick-image.html">Image</a></span> { <span class="name">id</span>: <span class="name">image</span> }
    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
        <span class="name">id</span>: <span class="name">text</span>
        <span class="name">wrapMode</span>: <span class="name">Text</span>.<span class="name">Wrap</span>
        <span class="name">anchors</span>.left: <span class="name">image</span>.<span class="name">right</span>; <span class="name">anchors</span>.right: <span class="name">parent</span>.<span class="name">right</span>
        <span class="name">anchors</span>.verticalCenter: <span class="name">parent</span>.<span class="name">verticalCenter</span>
    }
}</pre>
<p><b>Note: </b>Using implicitWidth of <a href="qml-qtquick-text.html">Text</a> or <a href="qml-qtquick-textedit.html">TextEdit</a> and setting the width explicitly incurs a performance penalty as the text must be laid out twice.</p></div></div><!-- @@@implicitWidth -->
<br/>
<!-- $$$layer.effect -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="layer.effect-prop"><td class="tblQmlPropNode"><p><a name="layer.effect-prop"></a><span class="name">layer.effect</span> : <span class="type">Component</span></p></td></tr></table></div></div><div class="qmldoc"><p>Holds the effect that is applied to this layer.</p>
<p>The effect is typically a <a href="qml-qtquick-shadereffect.html">ShaderEffect</a> component, although any <a href="qml-qtquick-item.html">Item</a> component can be assigned. The effect should have a source texture property with a name matching <a href="qml-qtquick-item.html#layer.samplerName-prop">layer.samplerName</a>.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#layer.samplerName-prop">layer.samplerName</a>.</p>
</div></div><!-- @@@layer.effect -->
<br/>
<!-- $$$layer.enabled -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="layer.enabled-prop"><td class="tblQmlPropNode"><p><a name="layer.enabled-prop"></a><span class="name">layer.enabled</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Holds whether the item is layered or not. Layering is disabled by default.</p>
<p>A layered item is rendered into an offscreen surface and cached until it is changed. Enabling layering for complex QML item hierarchies can sometimes be an optimization.</p>
<p>None of the other layer properties have any effect when the layer is disabled.</p>
</div></div><!-- @@@layer.enabled -->
<br/>
<!-- $$$layer.format -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="layer.format-prop"><td class="tblQmlPropNode"><p><a name="layer.format-prop"></a><span class="name">layer.format</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property defines the internal OpenGL format of the texture. Modifying this property makes most sense when the <i>layer.effect</i> is also specified. Depending on the OpenGL implementation, this property might allow you to save some texture memory.</p>
<ul>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.Alpha - GL_ALPHA;</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RGB - GL_RGB</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RGBA - GL_RGBA</li>
</ul>
<p><b>Note: </b><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RGB and <a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.Alpha should be used with caution, as support for these formats in the underlying hardare and driver is often not present.</p></div></div><!-- @@@layer.format -->
<br/>
<!-- $$$layer.mipmap -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="layer.mipmap-prop"><td class="tblQmlPropNode"><p><a name="layer.mipmap-prop"></a><span class="name">layer.mipmap</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>If this property is true, mipmaps are generated for the texture.</p>
<p><b>Note: </b>Some OpenGL ES 2 implementations do not support mipmapping of non-power-of-two textures.</p></div></div><!-- @@@layer.mipmap -->
<br/>
<!-- $$$layer.samplerName -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="layer.samplerName-prop"><td class="tblQmlPropNode"><p><a name="layer.samplerName-prop"></a><span class="name">layer.samplerName</span> : <span class="type">string</span></p></td></tr></table></div></div><div class="qmldoc"><p>Holds the name of the effect's source texture property.</p>
<p>This value must match the name of the effect's source texture property so that the Item can pass the layer's offscreen surface to the effect correctly.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#layer.effect-prop">layer.effect</a> and <a href="qml-qtquick-shadereffect.html">ShaderEffect</a>.</p>
</div></div><!-- @@@layer.samplerName -->
<br/>
<!-- $$$layer.smooth -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="layer.smooth-prop"><td class="tblQmlPropNode"><p><a name="layer.smooth-prop"></a><span class="name">layer.smooth</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Holds whether the layer is smoothly transformed.</p>
</div></div><!-- @@@layer.smooth -->
<br/>
<!-- $$$layer.sourceRect -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="layer.sourceRect-prop"><td class="tblQmlPropNode"><p><a name="layer.sourceRect-prop"></a><span class="name">layer.sourceRect</span> : <span class="type">rect</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property defines the rectangular area of the item that should be rendered into the texture. The source rectangle can be larger than the item itself. If the rectangle is null, which is the default, then the whole item is rendered to the texture.</p>
</div></div><!-- @@@layer.sourceRect -->
<br/>
<!-- $$$layer.textureSize -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="layer.textureSize-prop"><td class="tblQmlPropNode"><p><a name="layer.textureSize-prop"></a><span class="name">layer.textureSize</span> : <span class="type">size</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the requested pixel size of the layers texture. If it is empty, which is the default, the size of the item is used.</p>
<p><b>Note: </b>Some platforms have a limit on how small framebuffer objects can be, which means the actual texture size might be larger than the requested size.</p></div></div><!-- @@@layer.textureSize -->
<br/>
<!-- $$$layer.wrapMode -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="layer.wrapMode-prop"><td class="tblQmlPropNode"><p><a name="layer.wrapMode-prop"></a><span class="name">layer.wrapMode</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property defines the OpenGL wrap modes associated with the texture. Modifying this property makes most sense when the <i>layer.effect</i> is specified.</p>
<ul>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.ClampToEdge - GL_CLAMP_TO_EDGE both horizontally and vertically</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RepeatHorizontally - GL_REPEAT horizontally, GL_CLAMP_TO_EDGE vertically</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RepeatVertically - GL_CLAMP_TO_EDGE horizontally, GL_REPEAT vertically</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.Repeat - GL_REPEAT both horizontally and vertically</li>
</ul>
<p><b>Note: </b>Some OpenGL ES 2 implementations do not support the GL_REPEAT wrap mode with non-power-of-two textures.</p></div></div><!-- @@@layer.wrapMode -->
<br/>
<!-- $$$opacity -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="opacity-prop"><td class="tblQmlPropNode"><p><a name="opacity-prop"></a><span class="name">opacity</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the opacity of the item. Opacity is specified as a number between 0.0 (fully transparent) and 1.0 (fully opaque). The default value is 1.0&#x2e;</p>
<p>When this property is set, the specified opacity is also applied individually to child items. This may have an unintended effect in some circumstances. For example in the second set of rectangles below, the red rectangle has specified an opacity of 0.5, which affects the opacity of its blue child rectangle even though the child has not specified an opacity.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-item_opacity1.png" alt="" /></p></td><td ><pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
        <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
        <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
            <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
            <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
        }
    }
}</pre>
</td></tr>
<tr valign="top" class="even"><td ><p class="centerAlign"><img src="images/declarative-item_opacity2.png" alt="" /></p></td><td ><pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">opacity</span>: <span class="number">0.5</span>
        <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
        <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
        <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
            <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
            <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
        }
    }
}</pre>
</td></tr>
</table></div>
<p>Changing an item's opacity does not affect whether the item receives user input events. (In contrast, setting <a href="qml-qtquick-item.html#visible-prop">visible</a> property to <code>false</code> stops mouse events, and setting the <a href="qml-qtquick-item.html#enabled-prop">enabled</a> property to <code>false</code> stops mouse and keyboard events, and also removes active focus from the item.)</p>
<p><b>See also </b><a href="qml-qtquick-item.html#visible-prop">visible</a>.</p>
</div></div><!-- @@@opacity -->
<br/>
<!-- $$$parent -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="parent-prop"><td class="tblQmlPropNode"><p><a name="parent-prop"></a><span class="name">parent</span> : <span class="type"><a href="qml-qtquick-item.html">Item</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the visual parent of the item.</p>
<p><b>Note: </b>The concept of the <i>visual parent</i> differs from that of the <i>QObject parent</i>. An item's visual parent may not necessarily be the same as its object parent. See <a href="qtquick-visualcanvas-visualparent.html">Concepts - Visual Parent in Qt Quick</a> for more details.</p></div></div><!-- @@@parent -->
<br/>
<!-- $$$resources -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="resources-prop"><td class="tblQmlPropNode"><p><a name="resources-prop"></a><span class="name">resources</span> : <span class="type">list</span>&lt;<span class="type">Object</span>&gt;</p></td></tr></table></div></div><div class="qmldoc"><p>The children property contains the list of visual children of this item. The resources property contains non-visual resources that you want to reference by name.</p>
<p>It is not generally necessary to refer to these properties when adding child items or resources, as the default <a href="qml-qtquick-item.html#data-prop">data</a> property will automatically assign child objects to the <code>children</code> and <code>resources</code> properties as appropriate. See the <a href="qml-qtquick-item.html#data-prop">data</a> documentation for details.</p>
</div></div><!-- @@@resources -->
<br/>
<!-- $$$rotation -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="rotation-prop"><td class="tblQmlPropNode"><p><a name="rotation-prop"></a><span class="name">rotation</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the rotation of the item in degrees clockwise around its <a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a>.</p>
<p>The default value is 0 degrees (that is, no rotation).</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-rotation.png" alt="" /></p></td><td ><pre class="qml"><span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
    <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
    <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
        <span class="name">x</span>: <span class="number">25</span>; <span class="name">y</span>: <span class="number">25</span>; <span class="name">width</span>: <span class="number">50</span>; <span class="name">height</span>: <span class="number">50</span>
        <span class="name">rotation</span>: <span class="number">30</span>
    }
}</pre>
</td></tr>
</table></div>
<p><b>See also </b><a href="qml-qtquick-transform.html">Transform</a> and <a href="qml-qtquick-rotation.html">Rotation</a>.</p>
</div></div><!-- @@@rotation -->
<br/>
<!-- $$$scale -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="scale-prop"><td class="tblQmlPropNode"><p><a name="scale-prop"></a><span class="name">scale</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the scale factor for this item.</p>
<p>A scale of less than 1.0 causes the item to be rendered at a smaller size, and a scale greater than 1.0 renders the item at a larger size. A negative scale causes the item to be mirrored when rendered.</p>
<p>The default value is 1.0&#x2e;</p>
<p>Scaling is applied from the <a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a>.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-scale.png" alt="" /></p></td><td ><pre class="qml">import QtQuick 2.0

<span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
    <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
    <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>

    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">color</span>: <span class="string">&quot;green&quot;</span>
        <span class="name">width</span>: <span class="number">25</span>; <span class="name">height</span>: <span class="number">25</span>
    }

    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
        <span class="name">x</span>: <span class="number">25</span>; <span class="name">y</span>: <span class="number">25</span>; <span class="name">width</span>: <span class="number">50</span>; <span class="name">height</span>: <span class="number">50</span>
        <span class="name">scale</span>: <span class="number">1.4</span>
    }
}</pre>
</td></tr>
</table></div>
<p><b>See also </b><a href="qml-qtquick-transform.html">Transform</a> and <a href="qml-qtquick-scale.html">Scale</a>.</p>
</div></div><!-- @@@scale -->
<br/>
<!-- $$$smooth -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="smooth-prop"><td class="tblQmlPropNode"><p><a name="smooth-prop"></a><span class="name">smooth</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Primarily used in image based items to decide if the item should use smooth sampling or not. Smooth sampling is performed using linear interpolation, while non-smooth is performed using nearest neighbor.</p>
<p>In Qt Quick 2.0, this property has minimal impact on performance.</p>
<p>By default is true.</p>
</div></div><!-- @@@smooth -->
<br/>
<!-- $$$state -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="state-prop"><td class="tblQmlPropNode"><p><a name="state-prop"></a><span class="name">state</span> : <span class="type">string</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the name of the current state of the item.</p>
<p>If the item is in its default state, that is, no explicit state has been set, then this property holds an empty string. Likewise, you can return an item to its default state by setting this property to an empty string.</p>
<p><b>See also </b><a href="qtquick-statesanimations-states.html">Qt Quick States</a>.</p>
</div></div><!-- @@@state -->
<br/>
<!-- $$$states -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="states-prop"><td class="tblQmlPropNode"><p><a name="states-prop"></a><span class="name">states</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qtquick-state.html">State</a></span>&gt;</p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the list of possible states for this item. To change the state of this item, set the <a href="qml-qtquick-item.html#state-prop">state</a> property to one of these states, or set the <a href="qml-qtquick-item.html#state-prop">state</a> property to an empty string to revert the item to its default state.</p>
<p>This property is specified as a list of <a href="qml-qtquick-state.html">State</a> objects. For example, below is an item with &quot;red_color&quot; and &quot;blue_color&quot; states:</p>
<pre class="qml">import QtQuick 2.0

<span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
    <span class="name">id</span>: <span class="name">root</span>
    <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>

    <span class="name">states</span>: [
        <span class="type"><a href="qml-qtquick-state.html">State</a></span> {
            <span class="name">name</span>: <span class="string">&quot;red_color&quot;</span>
            <span class="type"><a href="qml-qtquick-propertychanges.html">PropertyChanges</a></span> { <span class="name">target</span>: <span class="name">root</span>; <span class="name">color</span>: <span class="string">&quot;red&quot;</span> }
        },
        <span class="type"><a href="qml-qtquick-state.html">State</a></span> {
            <span class="name">name</span>: <span class="string">&quot;blue_color&quot;</span>
            <span class="type"><a href="qml-qtquick-propertychanges.html">PropertyChanges</a></span> { <span class="name">target</span>: <span class="name">root</span>; <span class="name">color</span>: <span class="string">&quot;blue&quot;</span> }
        }
    ]
}</pre>
<p>See <a href="qtquick-statesanimations-states.html">Qt Quick States</a> and <a href="qtquick-statesanimations-animations.html">Animation and Transitions in Qt Quick</a> for more details on using states and transitions.</p>
<p><b>See also </b><a href="qtquick-statesanimations-topic.html#transitions">transitions</a>.</p>
</div></div><!-- @@@states -->
<br/>
<!-- $$$transform -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="transform-prop"><td class="tblQmlPropNode"><p><a name="transform-prop"></a><span class="name">transform</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qtquick-transform.html">Transform</a></span>&gt;</p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the list of transformations to apply.</p>
<p>For more information see <a href="qml-qtquick-transform.html">Transform</a>.</p>
</div></div><!-- @@@transform -->
<br/>
<!-- $$$transformOrigin -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="transformOrigin-prop"><td class="tblQmlPropNode"><p><a name="transformOrigin-prop"></a><span class="name">transformOrigin</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the origin point around which scale and rotation transform.</p>
<p>Nine transform origins are available, as shown in the image below. The default transform origin is <code>Item.Center</code>.</p>
<p class="centerAlign"><img src="images/declarative-transformorigin.png" alt="" /></p><p>This example rotates an image around its bottom-right corner.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-image.html">Image</a></span> {
    <span class="name">source</span>: <span class="string">&quot;myimage.png&quot;</span>
    <span class="name">transformOrigin</span>: <span class="name">Item</span>.<span class="name">BottomRight</span>
    <span class="name">rotation</span>: <span class="number">45</span>
}</pre>
<p>To set an arbitrary transform origin point use the <a href="qml-qtquick-scale.html">Scale</a> or <a href="qml-qtquick-rotation.html">Rotation</a> transform types with <a href="qml-qtquick-item.html#transform-prop">transform</a>.</p>
</div></div><!-- @@@transformOrigin -->
<br/>
<!-- $$$transitions -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="transitions-prop"><td class="tblQmlPropNode"><p><a name="transitions-prop"></a><span class="name">transitions</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qtquick-transition.html">Transition</a></span>&gt;</p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the list of transitions for this item. These define the transitions to be applied to the item whenever it changes its <a href="qml-qtquick-item.html#state-prop">state</a>.</p>
<p>This property is specified as a list of <a href="qmlexampletoggleswitch.html#transition">Transition</a> objects. For example:</p>
<pre class="qml">import QtQuick 2.0

<span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="name">transitions</span>: [
        <span class="type"><a href="qml-qtquick-transition.html">Transition</a></span> {
            <span class="comment">//...</span>
        },
        <span class="type"><a href="qml-qtquick-transition.html">Transition</a></span> {
            <span class="comment">//...</span>
        }
    ]
}</pre>
<p>See <a href="qtquick-statesanimations-states.html">Qt Quick States</a> and <a href="qtquick-statesanimations-animations.html">Animation and Transitions in Qt Quick</a> for more details on using states and transitions.</p>
<p><b>See also </b><a href="qtquick-statesanimations-topic.html#states">states</a>.</p>
</div></div><!-- @@@transitions -->
<br/>
<!-- $$$visible -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="visible-prop"><td class="tblQmlPropNode"><p><a name="visible-prop"></a><span class="name">visible</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds whether the item is visible. By default this is true.</p>
<p>Setting this property directly affects the <code>visible</code> value of child items. When set to <code>false</code>, the <code>visible</code> values of all child items also become <code>false</code>. When set to <code>true</code>, the <code>visible</code> values of child items are returned to <code>true</code>, unless they have explicitly been set to <code>false</code>.</p>
<p>(Because of this flow-on behavior, using the <code>visible</code> property may not have the intended effect if a property binding should only respond to explicit property changes. In such cases it may be better to use the <a href="qtquick-effects-topic.html#opacity">opacity</a> property instead.)</p>
<p>If this property is set to <code>false</code>, the item will no longer receive mouse events, but will continue to receive key events and will retain the keyboard <a href="qml-qtquick-item.html#focus-prop">focus</a> if it has been set. (In contrast, setting the <a href="qml-qtquick-item.html#enabled-prop">enabled</a> property to <code>false</code> stops both mouse and keyboard events, and also removes focus from the item.)</p>
<p><b>Note: </b>This property's value is only affected by changes to this property or the parent's <code>visible</code> property. It does not change, for example, if this item moves off-screen, or if the <a href="qtquick-effects-topic.html#opacity">opacity</a> changes to 0.</p><p><b>See also </b><a href="qtquick-effects-topic.html#opacity">opacity</a> and <a href="qml-qtquick-item.html#enabled-prop">enabled</a>.</p>
</div></div><!-- @@@visible -->
<br/>
<!-- $$$visibleChildren -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="visibleChildren-prop"><td class="tblQmlPropNode"><p><a name="visibleChildren-prop"></a><span class="name">visibleChildren</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qtquick-item.html">Item</a></span>&gt;</p></td></tr></table></div></div><div class="qmldoc"><p>This read-only property lists all of the item's children that are currently visible. Note that a child's visibility may have changed explicitly, or because the visibility of this (it's parent) item or another grandparent changed.</p>
</div></div><!-- @@@visibleChildren -->
<br/>
<!-- $$$width -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="width-prop"><td class="tblQmlPropNode"><p><a name="width-prop"></a><span class="name">width</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Defines the item's position and size.</p>
<p>The (x,y) position is relative to the <a href="qml-qtquick-item.html#parent-prop">parent</a>.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> { <span class="name">x</span>: <span class="number">100</span>; <span class="name">y</span>: <span class="number">100</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span> }</pre>
</div></div><!-- @@@width -->
<br/>
<!-- $$$x -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="x-prop"><td class="tblQmlPropNode"><p><a name="x-prop"></a><span class="name">x</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Defines the item's position and size.</p>
<p>The (x,y) position is relative to the <a href="qml-qtquick-item.html#parent-prop">parent</a>.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> { <span class="name">x</span>: <span class="number">100</span>; <span class="name">y</span>: <span class="number">100</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span> }</pre>
</div></div><!-- @@@x -->
<br/>
<!-- $$$y -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="y-prop"><td class="tblQmlPropNode"><p><a name="y-prop"></a><span class="name">y</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Defines the item's position and size.</p>
<p>The (x,y) position is relative to the <a href="qml-qtquick-item.html#parent-prop">parent</a>.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> { <span class="name">x</span>: <span class="number">100</span>; <span class="name">y</span>: <span class="number">100</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span> }</pre>
</div></div><!-- @@@y -->
<br/>
<!-- $$$z -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="z-prop"><td class="tblQmlPropNode"><p><a name="z-prop"></a><span class="name">z</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>Sets the stacking order of sibling items. By default the stacking order is 0.</p>
<p>Items with a higher stacking value are drawn on top of siblings with a lower stacking order. Items with the same stacking value are drawn bottom up in the order they appear. Items with a negative stacking value are drawn under their parent's content.</p>
<p>The following example shows the various effects of stacking order.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-item_stacking1.png" alt="" /></p></td><td >Same <code>z</code> - later children above earlier children:<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
        <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
    }
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
        <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
    }
}</pre>
</td></tr>
<tr valign="top" class="even"><td ><p class="centerAlign"><img src="images/declarative-item_stacking2.png" alt="" /></p></td><td >Higher <code>z</code> on top:<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">z</span>: <span class="number">1</span>
        <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
        <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
    }
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
        <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
    }
}</pre>
</td></tr>
<tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-item_stacking3.png" alt="" /></p></td><td >Same <code>z</code> - children above parents:<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
        <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
        <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
            <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
            <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
        }
    }
}</pre>
</td></tr>
<tr valign="top" class="even"><td ><p class="centerAlign"><img src="images/declarative-item_stacking4.png" alt="" /></p></td><td >Lower <code>z</code> below:<pre class="qml"><span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
        <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
        <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
            <span class="name">z</span>: -<span class="number">1</span>
            <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
            <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
        }
    }
}</pre>
</td></tr>
</table></div>
</div></div><!-- @@@z -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$childAt -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="childAt-method"><td class="tblQmlFuncNode"><p><a name="childAt-method"></a><span class="name">childAt</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 first visible child item found at point (<i>x</i>, <i>y</i>) within the coordinate system of this item.</p>
<p>Returns <code>null</code> if there is no such item.</p>
</div></div><!-- @@@childAt -->
<br/>
<!-- $$$contains -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="contains-method"><td class="tblQmlFuncNode"><p><a name="contains-method"></a><span class="type">object</span> <span class="name">contains</span>(<span class="type">point</span><i> point</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Returns true if this item contains <i>point</i>, which is in local coordinates; returns false otherwise.</p>
</div></div><!-- @@@contains -->
<br/>
<!-- $$$forceActiveFocus -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="forceActiveFocus-method-2"><td class="tblQmlFuncNode"><p><a name="forceActiveFocus-method-2"></a><span class="name">forceActiveFocus</span>(<span class="type">Qt::FocusReason</span><i> reason</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>This is an overloaded function.</p>
<p>Forces active focus on the item with the given <i>reason</i>.</p>
<p>This method sets focus on the item and ensures that all ancestor <a href="qml-qtquick-focusscope.html">FocusScope</a> objects in the object hierarchy are also given <a href="qml-qtquick-item.html#focus-prop">focus</a>.</p>
<p>This QML method was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#activeFocus-prop">activeFocus</a> and Qt::FocusReason.</p>
</div></div><!-- @@@forceActiveFocus -->
<br/>
<!-- $$$forceActiveFocus -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="forceActiveFocus-method"><td class="tblQmlFuncNode"><p><a name="forceActiveFocus-method"></a><span class="name">forceActiveFocus</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>Forces active focus on the item.</p>
<p>This method sets focus on the item and ensures that all ancestor <a href="qml-qtquick-focusscope.html">FocusScope</a> objects in the object hierarchy are also given <a href="qml-qtquick-item.html#focus-prop">focus</a>.</p>
<p>The reason for the focus change will be Qt::OtherFocusReason. Use the overloaded method to specify the focus reason to enable better handling of the focus change.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#activeFocus-prop">activeFocus</a>.</p>
</div></div><!-- @@@forceActiveFocus -->
<br/>
<!-- $$$grabToImage -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="grabToImage-method"><td class="tblQmlFuncNode"><p><a name="grabToImage-method"></a><span class="type">bool</span> <span class="name">grabToImage</span>(<span class="type">callback</span>, <span class="type">targetSize</span>)</p></td></tr></table></div></div><div class="qmldoc"><p>Grabs the item into an in-memory image.</p>
<p>The grab happens asynchronously and the JavaScript function <i>callback</i> is invoked when the grab is completed.</p>
<p>Use <i>targetSize</i> to specify the size of the target image. By default, the result will have the same size as the item.</p>
<p>If the grab could not be initiated, the function returns <code>false</code>.</p>
<p>The following snippet shows how to grab an item and store the results to a file.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
    <span class="name">id</span>: <span class="name">source</span>
    <span class="name">width</span>: <span class="number">100</span>
    <span class="name">height</span>: <span class="number">100</span>
    <span class="name">gradient</span>: <span class="name">Gradient</span> {
        <span class="type"><a href="qml-qtquick-gradientstop.html">GradientStop</a></span> { <span class="name">position</span>: <span class="number">0</span>; <span class="name">color</span>: <span class="string">&quot;steelblue&quot;</span> }
        <span class="type"><a href="qml-qtquick-gradientstop.html">GradientStop</a></span> { <span class="name">position</span>: <span class="number">1</span>; <span class="name">color</span>: <span class="string">&quot;black&quot;</span> }
    }
}
    <span class="comment">// ...</span>
    <span class="name">source</span>.<span class="name">grabToImage</span>(<span class="keyword">function</span>(<span class="name">result</span>) {
                           <span class="name">result</span>.<span class="name">saveToFile</span>(<span class="string">&quot;something.png&quot;</span>);
                       });</pre>
<p>The following snippet shows how to grab an item and use the results in another image element.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-image.html">Image</a></span> {
    <span class="name">id</span>: <span class="name">image</span>
}
    <span class="comment">// ...</span>
    <span class="name">source</span>.<span class="name">grabToImage</span>(<span class="keyword">function</span>(<span class="name">result</span>) {
                           <span class="name">image</span>.<span class="name">source</span> <span class="operator">=</span> <span class="name">result</span>.<span class="name">url</span>;
                       },
                       <span class="name">Qt</span>.<span class="name">size</span>(<span class="number">50</span>, <span class="number">50</span>));</pre>
<p><b>Note: </b>This function will render the item to an offscreen surface and copy that surface from the GPU's memory into the CPU's memory, which can be quite costly. For &quot;live&quot; preview, use <a href="qml-qtquick-item.html#layer.enabled-prop">layers</a> or <a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.</p></div></div><!-- @@@grabToImage -->
<br/>
<!-- $$$mapFromItem -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="mapFromItem-method-2"><td class="tblQmlFuncNode"><p><a name="mapFromItem-method-2"></a><span class="type">object</span> <span class="name">mapFromItem</span>(<span class="type"><a href="qml-qtquick-item.html">Item</a></span><i> item</i>, <span class="type">real</span><i> x</i>, <span class="type">real</span><i> y</i>, <span class="type">real</span><i> width</i>, <span class="type">real</span><i> height</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Maps the point (<i>x</i>, <i>y</i>) or rect (<i>x</i>, <i>y</i>, <i>width</i>, <i>height</i>), which is in <i>item</i>'s coordinate system, to this item's coordinate system, and returns a point or <b class="redFont"><code>\rect</code></b> matching the mapped coordinate.</p>
<p>If <i>item</i> is a <code>null</code> value, this maps the point or rect from the coordinate system of the root QML view.</p>
</div></div><!-- @@@mapFromItem -->
<br/>
<!-- $$$mapFromItem -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="mapFromItem-method"><td class="tblQmlFuncNode"><p><a name="mapFromItem-method"></a><span class="type">object</span> <span class="name">mapFromItem</span>(<span class="type"><a href="qml-qtquick-item.html">Item</a></span><i> item</i>, <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>Maps the point (<i>x</i>, <i>y</i>) or rect (<i>x</i>, <i>y</i>, <i>width</i>, <i>height</i>), which is in <i>item</i>'s coordinate system, to this item's coordinate system, and returns a point or <b class="redFont"><code>\rect</code></b> matching the mapped coordinate.</p>
<p>If <i>item</i> is a <code>null</code> value, this maps the point or rect from the coordinate system of the root QML view.</p>
</div></div><!-- @@@mapFromItem -->
<br/>
<!-- $$$mapToItem -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="mapToItem-method-2"><td class="tblQmlFuncNode"><p><a name="mapToItem-method-2"></a><span class="type">object</span> <span class="name">mapToItem</span>(<span class="type"><a href="qml-qtquick-item.html">Item</a></span><i> item</i>, <span class="type">real</span><i> x</i>, <span class="type">real</span><i> y</i>, <span class="type">real</span><i> width</i>, <span class="type">real</span><i> height</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Maps the point (<i>x</i>, <i>y</i>) or rect (<i>x</i>, <i>y</i>, <i>width</i>, <i>height</i>), which is in this item's coordinate system, to <i>item</i>'s coordinate system, and returns a point or rect matching the mapped coordinate.</p>
<p>If <i>item</i> is a <code>null</code> value, this maps the point or rect to the coordinate system of the root QML view.</p>
</div></div><!-- @@@mapToItem -->
<br/>
<!-- $$$mapToItem -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="mapToItem-method"><td class="tblQmlFuncNode"><p><a name="mapToItem-method"></a><span class="type">object</span> <span class="name">mapToItem</span>(<span class="type"><a href="qml-qtquick-item.html">Item</a></span><i> item</i>, <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>Maps the point (<i>x</i>, <i>y</i>) or rect (<i>x</i>, <i>y</i>, <i>width</i>, <i>height</i>), which is in this item's coordinate system, to <i>item</i>'s coordinate system, and returns a point or rect matching the mapped coordinate.</p>
<p>If <i>item</i> is a <code>null</code> value, this maps the point or rect to the coordinate system of the root QML view.</p>
</div></div><!-- @@@mapToItem -->
<br/>
<!-- $$$nextItemInFocusChain -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="nextItemInFocusChain-method"><td class="tblQmlFuncNode"><p><a name="nextItemInFocusChain-method"></a><span class="name">nextItemInFocusChain</span>(<span class="type">bool</span><i> forward</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Returns the item in the focus chain which is next to this item. If <i>forward</i> is <code>true</code>, or not supplied, it is the next item in the forwards direction. If <i>forward</i> is <code>false</code>, it is the next item in the backwards direction.</p>
<p>This QML method was introduced in  Qt 5.1.</p>
</div></div><!-- @@@nextItemInFocusChain -->
<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>