aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmlls/utils/data/qdochtmlparser/qml-qtquick-item.html
blob: fc34b2d5db87f164e7387d08d17541af3f7014d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- qquickitem.cpp -->
  <meta name="description" content="A basic visual QML type.">
  <title>Item QML Type | Qt Quick 6.8.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="../qtdoc/index.html" translate="no">Qt 6.8</a></li>
<li><a href="qtquick-index.html" translate="no">Qt Quick</a></li>
<li><a href="qtquick-qmlmodule.html" translate="no">QML Types</a></li>
<li>Item</li>
<li id="buildversion"><a href="qtquick-index.html" translate="no">Qt 6.8.0 Reference Documentation</a></li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</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" translate="no">Item QML Type</h1>
<!-- $$$Item-brief -->
<p>A basic visual QML type. <a href="#details">More...</a></p>
<!-- @@@Item -->
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtQuick</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="qquickitem.html" translate="no">QQuickItem</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="../qtqml/qml-qtqml-qtobject.html" translate="no">QtObject</a></p>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qtquick-animatedsprite.html" translate="no">AnimatedSprite</a>, <a href="qml-qtquick-borderimage.html" translate="no">BorderImage</a>, <a href="qml-qtquick-canvas.html" translate="no">Canvas</a>, <a href="qml-qtquick-column.html" translate="no">Column</a>, <a href="qml-qtquick-layouts-columnlayout.html" translate="no">ColumnLayout</a>, <a href="qml-qtquick-droparea.html" translate="no">DropArea</a>, <a href="qml-qtquick-flickable.html" translate="no">Flickable</a>, <a href="qml-qtquick-flipable.html" translate="no">Flipable</a>, <a href="qml-qtquick-flow.html" translate="no">Flow</a>, <a href="qml-qtquick-focusscope.html" translate="no">FocusScope</a>, <a href="qml-qtquick-grid.html" translate="no">Grid</a>, <a href="qml-qtquick-layouts-gridlayout.html" translate="no">GridLayout</a>, <a href="qml-qtquick-image.html" translate="no">Image</a>, <a href="qml-qtquick-layouts-layoutitemproxy.html" translate="no">LayoutItemProxy</a>, <a href="qml-qtquick-loader.html" translate="no">Loader</a>, <a href="qml-qtquick-mousearea.html" translate="no">MouseArea</a>, <a href="qml-qtquick-effects-multieffect.html" translate="no">MultiEffect</a>, <a href="qml-qtquick-multipointtoucharea.html" translate="no">MultiPointTouchArea</a>, <a href="qml-qtquick-particles-particlepainter.html" translate="no">ParticlePainter</a>, <a href="qml-qtquick-pathview.html" translate="no">PathView</a>, <a href="qml-qtquick-pincharea.html" translate="no">PinchArea</a>, <a href="qml-qtquick-rectangle.html" translate="no">Rectangle</a>, <a href="qml-qtquick-repeater.html" translate="no">Repeater</a>, <a href="qml-qtquick-row.html" translate="no">Row</a>, <a href="qml-qtquick-layouts-rowlayout.html" translate="no">RowLayout</a>, <a href="qml-qtquick-shadereffect.html" translate="no">ShaderEffect</a>, <a href="qml-qtquick-shadereffectsource.html" translate="no">ShaderEffectSource</a>, <a href="qml-qtquick-shapes-shape.html" translate="no">Shape</a>, <a href="qml-qtquick-spritesequence.html" translate="no">SpriteSequence</a>, <a href="qml-qtquick-layouts-stacklayout.html" translate="no">StackLayout</a>, <a href="qml-qtquick-text.html" translate="no">Text</a>, <a href="qml-qtquick-textedit.html" translate="no">TextEdit</a>, <a href="qml-qtquick-textinput.html" translate="no">TextInput</a>, and <a href="qml-qtquick-windowcontainer.html" translate="no">WindowContainer</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>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#activeFocus-prop" translate="no">activeFocus</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#activeFocusOnTab-prop" translate="no">activeFocusOnTab</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors-prop" translate="no">anchors</a></b><ul>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.alignWhenCentered-prop" translate="no">anchors.alignWhenCentered</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.baseline-prop" translate="no">anchors.baseline</a></b> : AnchorLine</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.baselineOffset-prop" translate="no">anchors.baselineOffset</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.bottom-prop" translate="no">anchors.bottom</a></b> : AnchorLine</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.bottomMargin-prop" translate="no">anchors.bottomMargin</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.centerIn-prop" translate="no">anchors.centerIn</a></b> : Item</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.fill-prop" translate="no">anchors.fill</a></b> : Item</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.horizontalCenter-prop" translate="no">anchors.horizontalCenter</a></b> : AnchorLine</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.horizontalCenterOffset-prop" translate="no">anchors.horizontalCenterOffset</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.left-prop" translate="no">anchors.left</a></b> : AnchorLine</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.leftMargin-prop" translate="no">anchors.leftMargin</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.margins-prop" translate="no">anchors.margins</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.right-prop" translate="no">anchors.right</a></b> : AnchorLine</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.rightMargin-prop" translate="no">anchors.rightMargin</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.top-prop" translate="no">anchors.top</a></b> : AnchorLine</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.topMargin-prop" translate="no">anchors.topMargin</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.verticalCenter-prop" translate="no">anchors.verticalCenter</a></b> : AnchorLine</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#anchors.verticalCenterOffset-prop" translate="no">anchors.verticalCenterOffset</a></b> : real</li>
</ul>
</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#antialiasing-prop" translate="no">antialiasing</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#baselineOffset-prop" translate="no">baselineOffset</a></b> : int</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#children-prop" translate="no">children</a></b> : list&lt;Item&gt;</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#childrenRect-prop" translate="no">childrenRect</a></b><ul>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#childrenRect.height-prop" translate="no">childrenRect.height</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#childrenRect.width-prop" translate="no">childrenRect.width</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#childrenRect.x-prop" translate="no">childrenRect.x</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#childrenRect.y-prop" translate="no">childrenRect.y</a></b> : real</li>
</ul>
</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#clip-prop" translate="no">clip</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#containmentMask-prop" translate="no">containmentMask</a></b> : QObject*</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#data-prop" translate="no">data</a></b> : list&lt;QtObject&gt;</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#enabled-prop" translate="no">enabled</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#focus-prop" translate="no">focus</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#focusPolicy-prop" translate="no">focusPolicy</a></b> : enumeration <code class="summary extra" translate="no">(since 6.7)</code></li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#height-prop" translate="no">height</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#implicitHeight-prop" translate="no">implicitHeight</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#implicitWidth-prop" translate="no">implicitWidth</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.effect-prop" translate="no">layer.effect</a></b> : Component</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.enabled-prop" translate="no">layer.enabled</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.format-prop" translate="no">layer.format</a></b> : enumeration</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.live-prop" translate="no">layer.live</a></b> : bool <code class="summary extra" translate="no">(since 6.5)</code></li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.mipmap-prop" translate="no">layer.mipmap</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.samplerName-prop" translate="no">layer.samplerName</a></b> : string</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.samples-prop" translate="no">layer.samples</a></b> : enumeration</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.smooth-prop" translate="no">layer.smooth</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.sourceRect-prop" translate="no">layer.sourceRect</a></b> : rect</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.textureMirroring-prop" translate="no">layer.textureMirroring</a></b> : enumeration</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.textureSize-prop" translate="no">layer.textureSize</a></b> : size</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#layer.wrapMode-prop" translate="no">layer.wrapMode</a></b> : enumeration</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#opacity-prop" translate="no">opacity</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#palette-prop" translate="no">palette</a></b> : Palette <code class="summary extra" translate="no">(since 6.0)</code></li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#parent-prop" translate="no">parent</a></b> : Item</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#resources-prop" translate="no">resources</a></b> : list&lt;QtObject&gt;</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#rotation-prop" translate="no">rotation</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#scale-prop" translate="no">scale</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#smooth-prop" translate="no">smooth</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#state-prop" translate="no">state</a></b> : string</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#states-prop" translate="no">states</a></b> : list&lt;State&gt;</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#transform-prop" translate="no">transform</a></b> : list&lt;Transform&gt;</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#transformOrigin-prop" translate="no">transformOrigin</a></b> : enumeration</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#transitions-prop" translate="no">transitions</a></b> : list&lt;Transition&gt;</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#visible-prop" translate="no">visible</a></b> : bool</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#visibleChildren-prop" translate="no">visibleChildren</a></b> : list&lt;Item&gt;</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#width-prop" translate="no">width</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#x-prop" translate="no">x</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#y-prop" translate="no">y</a></b> : real</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#z-prop" translate="no">z</a></b> : real</li>
</ul>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#childAt-method" translate="no">childAt</a></b>(real <i>x</i>, real <i>y</i>)</li>
<li class="fn" translate="no">bool <b><a href="qml-qtquick-item.html#contains-method" translate="no">contains</a></b>(point <i>point</i>)</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#dumpItemTree-method" translate="no">dumpItemTree</a></b>() <code class="summary extra" translate="no">(since 6.3)</code></li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#forceActiveFocus-method" translate="no">forceActiveFocus</a></b>()</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#forceActiveFocus-method-1" translate="no">forceActiveFocus</a></b>(Qt::FocusReason <i>reason</i>)</li>
<li class="fn" translate="no">bool <b><a href="qml-qtquick-item.html#grabToImage-method" translate="no">grabToImage</a></b>(<i>callback</i>, <i>targetSize</i>)</li>
<li class="fn" translate="no">point <b><a href="qml-qtquick-item.html#mapFromGlobal-method" translate="no">mapFromGlobal</a></b>(real <i>x</i>, real <i>y</i>)</li>
<li class="fn" translate="no">point <b><a href="qml-qtquick-item.html#mapFromItem-method" translate="no">mapFromItem</a></b>(Item <i>item</i>, real <i>x</i>, real <i>y</i>)</li>
<li class="fn" translate="no">point <b><a href="qml-qtquick-item.html#mapFromItem-method-1" translate="no">mapFromItem</a></b>(Item <i>item</i>, point <i>p</i>)</li>
<li class="fn" translate="no">rect <b><a href="qml-qtquick-item.html#mapFromItem-method-2" translate="no">mapFromItem</a></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" translate="no">rect <b><a href="qml-qtquick-item.html#mapFromItem-method-3" translate="no">mapFromItem</a></b>(Item <i>item</i>, rect <i>r</i>)</li>
<li class="fn" translate="no">point <b><a href="qml-qtquick-item.html#mapToGlobal-method" translate="no">mapToGlobal</a></b>(real <i>x</i>, real <i>y</i>)</li>
<li class="fn" translate="no">point <b><a href="qml-qtquick-item.html#mapToItem-method" translate="no">mapToItem</a></b>(Item <i>item</i>, real <i>x</i>, real <i>y</i>)</li>
<li class="fn" translate="no">point <b><a href="qml-qtquick-item.html#mapToItem-method-1" translate="no">mapToItem</a></b>(Item <i>item</i>, point <i>p</i>)</li>
<li class="fn" translate="no">rect <b><a href="qml-qtquick-item.html#mapToItem-method-2" translate="no">mapToItem</a></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" translate="no">rect <b><a href="qml-qtquick-item.html#mapToItem-method-3" translate="no">mapToItem</a></b>(Item <i>item</i>, rect <i>r</i>)</li>
<li class="fn" translate="no"><b><a href="qml-qtquick-item.html#nextItemInFocusChain-method" translate="no">nextItemInFocusChain</a></b>(bool <i>forward</i>)</li>
</ul>
<!-- $$$Item-description -->
<h2 id="details">Detailed Description</h2>
<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" translate="no">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" translate="no">
 import QtQuick 2.0

 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-image.html" translate="no">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" translate="no">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" translate="no">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>
<h3 id="event-handling">Event Handling</h3>
<p>All Item-based visual types can use <a href="qtquickhandlers-index.html" translate="no">Input Handlers</a> to handle incoming input events (subclasses of <a href="../qtgui/qinputevent.html" translate="no">QInputEvent</a>), such as mouse, touch and key events. This is the preferred declarative way to handle events.</p>
<p>An alternative way to handle touch events is to subclass <a href="qquickitem.html" translate="no">QQuickItem</a>, call setAcceptTouchEvents() in the constructor, and override touchEvent(). <a href="../qtcore/qevent.html#accepted-prop" translate="no">Accept</a> the entire event to stop delivery to items underneath, and to exclusively grab for all the event's touch points. Use <a href="../qtgui/qpointerevent.html#setExclusiveGrabber" translate="no">QPointerEvent::setExclusiveGrabber</a>() to grab only certain touchpoints, and allow the event to be delivered further.</p>
<p>Likewise, a <a href="qquickitem.html" translate="no">QQuickItem</a> subclass can call setAcceptedMouseButtons() to register to receive mouse button events, setAcceptHoverEvents() to receive hover events (mouse movements while no button is pressed), and override the virtual functions mousePressEvent(), mouseMoveEvent(), and mouseReleaseEvent(). Those can also accept the event to prevent further delivery and get an implicit grab at the same time; or explicitly <a href="../qtgui/qpointerevent.html#setExclusiveGrabber" translate="no">grab</a> the single <a href="../qtgui/qeventpoint.html" translate="no">QEventPoint</a> that the <a href="../qtgui/qmouseevent.html" translate="no">QMouseEvent</a> carries.</p>
<p>Key handling is available to all Item-based visual types via the <a href="qml-qtquick-keys.html" translate="no">Keys</a> attached property. The <i>Keys</i> attached property provides basic signals such as <a href="qml-qtquick-keys.html#pressed-signal" translate="no">pressed</a> and <a href="qml-qtquick-keys.html#released-signal" translate="no">released</a>, as well as signals for specific keys, such as <a href="qml-qtquick-keys.html#spacePressed-signal" translate="no">spacePressed</a>. The example below assigns <a href="qtquick-input-focus.html" translate="no">keyboard focus</a> to the item and handles the left key via the general <code translate="no">onPressed</code> handler and the return key via the <code translate="no">onReturnPressed</code> handler:</p>
<pre class="qml" translate="no">
 import QtQuick 2.0

 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="name">focus</span>: <span class="number">true</span>
     <span class="name">Keys</span>.onPressed: (<span class="keyword"></span>event)=&gt; {
         <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" translate="no">Keys</a> attached property for detailed documentation.</p>
<h3 id="layout-mirroring">Layout Mirroring</h3>
<p>Item layouts can be mirrored using the <a href="qml-qtquick-layoutmirroring.html" translate="no">LayoutMirroring</a> attached property. This causes <a href="qml-qtquick-item.html#anchors.top-prop" translate="no">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" translate="no">ListView</a> or <a href="qml-qtquick-row.html" translate="no">Row</a>) to horizontally reverse the direction of their layouts.</p>
<p>See <a href="qml-qtquick-layoutmirroring.html" translate="no">LayoutMirroring</a> for more details.</p>
<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" translate="no">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" translate="no">layer.textureSize</a>. To render only a section of the item into the texture, use <a href="qml-qtquick-item.html#layer.sourceRect-prop" translate="no">layer.sourceRect</a>. It is also possible to specify <a href="qml-qtquick-item.html#layer.sourceRect-prop" translate="no">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" translate="no">layer.smooth</a> is set to <code translate="no">true</code> and will use mipmap for downsampling if <a href="qml-qtquick-item.html#layer.mipmap-prop" translate="no">layer.mipmap</a> is set to <code translate="no">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" translate="no">Image::mipmap</a>.</p>
<h3 id="layer-opacity-vs-item-opacity">Layer Opacity vs Item Opacity</h3>
<p>When applying <a href="qml-qtquick-item.html#opacity-prop" translate="no">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" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">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" translate="no">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" translate="no">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" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">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" translate="no">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" translate="no">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>
<h3 id="combined-with-shadereffects">Combined with ShaderEffects</h3>
<p>Setting <a href="qml-qtquick-item.html#layer.enabled-prop" translate="no">layer.enabled</a> to true will turn the item into a <a href="qquickitem.html#isTextureProvider" translate="no">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" translate="no">ShaderEffect</a> type.</p>
<p>It is possible to apply an effect on a layer at runtime using layer.effect:</p>
<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">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;effect.frag.qsb&quot;</span>
     }
 }
</pre>
<p>See <a href="qml-qtquick-shadereffect.html" translate="no">ShaderEffect</a> for more information about using effects.</p>
<div class="admonition note">
<p><b>Note: </b><a href="qml-qtquick-item.html#layer.enabled-prop" translate="no">layer.enabled</a> is actually just a more convenient way of using <a href="qml-qtquick-shadereffectsource.html" translate="no">ShaderEffectSource</a>.</p>
</div>
<h3 id="memory-and-performance">Memory and Performance</h3>
<p>When an item's layer is enabled, the scene graph will allocate memory in the GPU equal to <code translate="no">width x height x 4</code>. In memory constrained configurations, large layers should be used with care.</p>
<p>In the <a href="../qtgui/qpainter.html" translate="no">QPainter</a> / <a href="../qtwidgets/qwidget.html" translate="no">QWidget</a> world, it is sometimes 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" translate="no">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" translate="no">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>
<!-- $$$ -->
<div class="qmlitem"><div class="fngroup">
<div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="children-prop">
<td class="tblQmlPropNode"><p>
<span class="name">children</span> : <span class="type"><a href="../qtqml/qml-list.html" translate="no">list</a></span>&lt;<span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span>&gt;</p></td></tr>
<tr valign="top" class="odd" id="resources-prop">
<td class="tblQmlPropNode"><p>
<span class="name">resources</span> : <span class="type"><a href="../qtqml/qml-list.html" translate="no">list</a></span>&lt;<span class="type"><a href="../qtqml/qml-qtqml-qtobject.html" translate="no">QtObject</a></span>&gt;</p></td></tr>
</table></div></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" translate="no">data</a> property will automatically assign child objects to the <code translate="no">children</code> and <code translate="no">resources</code> properties as appropriate. See the <a href="qml-qtquick-item.html#data-prop" translate="no">data</a> documentation for details.</p>
</div></div><!-- @@@ -->
<br/>
<!-- $$$ -->
<div class="qmlitem"><div class="fngroup">
<div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="height-prop">
<td class="tblQmlPropNode"><p>
<span class="name">height</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="width-prop">
<td class="tblQmlPropNode"><p>
<span class="name">width</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="x-prop">
<td class="tblQmlPropNode"><p>
<span class="name">x</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="y-prop">
<td class="tblQmlPropNode"><p>
<span class="name">y</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
</table></div></div>
</div><div class="qmldoc"><p>Defines the item's position and size. The default value is <code translate="no">0</code>.</p>
<p>The (x,y) position is relative to the <a href="qml-qtquick-item.html#parent-prop" translate="no">parent</a>.</p>
<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">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><!-- @@@ -->
<br/>
<!-- $$$ -->
<div class="qmlitem"><div class="fngroup">
<div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="implicitHeight-prop">
<td class="tblQmlPropNode"><p>
<span class="name">implicitHeight</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="implicitWidth-prop">
<td class="tblQmlPropNode"><p>
<span class="name">implicitWidth</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
</table></div></div>
</div><div class="qmldoc"><p>Defines the preferred width or height of the Item.</p>
<p>If <a href="qml-qtquick-item.html#width-prop" translate="no">width</a> or <a href="qml-qtquick-item.html#height-prop" translate="no">height</a> is not specified, an item's effective size will be determined by its <a href="qml-qtquick-item.html#implicitWidth-prop" translate="no">implicitWidth</a> or <a href="qml-qtquick-item.html#implicitHeight-prop" translate="no">implicitHeight</a>.</p>
<p>However, if an item is the child of a <a href="qtquicklayouts-index.html" translate="no">layout</a>, the layout will determine the item's preferred size using its implicit size. In such a scenario, the explicit <a href="qml-qtquick-item.html#width-prop" translate="no">width</a> or <a href="qml-qtquick-item.html#height-prop" translate="no">height</a> will be ignored.</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" translate="no">Image</a> and <a href="qml-qtquick-text.html" translate="no">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" translate="no">
 <span class="comment">// Label.qml</span>
 import QtQuick 2.0

 <span class="type"><a href="qml-qtquick-item.html" translate="no">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" translate="no">Image</a></span> { <span class="name">id</span>: <span class="name">image</span> }
     <span class="type"><a href="qml-qtquick-text.html" translate="no">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>
<div class="admonition note">
<p><b>Note: </b>Using <a href="qml-qtquick-item.html#implicitWidth-prop" translate="no">implicitWidth</a> of <a href="qml-qtquick-text.html" translate="no">Text</a> or <a href="qml-qtquick-textedit.html" translate="no">TextEdit</a> and setting the width explicitly incurs a performance penalty as the text must be laid out twice.</p>
</div>
</div></div><!-- @@@ -->
<br/>
<!-- $$$activeFocus -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="activeFocus-prop">
<td class="tblQmlPropNode"><p>
<span class="name">activeFocus</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></span> <code class="details extra" translate="no">[read-only]</code></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" translate="no">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" translate="no">focus</a> on an item and its enclosing <a href="qml-qtquick-focusscope.html" translate="no">FocusScope</a> objects. In the following example, the <code translate="no">input</code> and <code translate="no">focusScope</code> objects will have active focus, while the root rectangle object will not.</p>
<pre class="qml" translate="no">
 import QtQuick 2.0

 <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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" translate="no">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" translate="no">focus</a> and <a href="qtquick-input-focus.html" translate="no">Keyboard Focus in Qt Quick</a>.</p>
</div></div><!-- @@@activeFocus -->
<br/>
<!-- $$$activeFocusOnTab -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="activeFocusOnTab-prop">
<td class="tblQmlPropNode"><p>
<span class="name">activeFocusOnTab</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property holds whether the item wants to be in the tab focus chain. By default, this is set to <code translate="no">false</code>.</p>
<p>The tab focus chain traverses elements by first visiting 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" translate="no">KeyNavigation</a>. Tab key events used by Keys or <a href="qml-qtquick-keynavigation.html" translate="no">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" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="even" id="anchors-prop"><th class="centerAlign"><p><b>anchors group</b></p></th></tr>
<tr valign="top" class="odd" id="anchors.alignWhenCentered-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.alignWhenCentered</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.baseline-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.baseline</span> : <span class="type">AnchorLine</span></p></td></tr>
<tr valign="top" class="odd" id="anchors.baselineOffset-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.baselineOffset</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.bottom-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.bottom</span> : <span class="type">AnchorLine</span></p></td></tr>
<tr valign="top" class="odd" id="anchors.bottomMargin-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.bottomMargin</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.centerIn-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.centerIn</span> : <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.fill-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.fill</span> : <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.horizontalCenter-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.horizontalCenter</span> : <span class="type">AnchorLine</span></p></td></tr>
<tr valign="top" class="odd" id="anchors.horizontalCenterOffset-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.horizontalCenterOffset</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.left-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.left</span> : <span class="type">AnchorLine</span></p></td></tr>
<tr valign="top" class="odd" id="anchors.leftMargin-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.leftMargin</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.margins-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.margins</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.right-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.right</span> : <span class="type">AnchorLine</span></p></td></tr>
<tr valign="top" class="odd" id="anchors.rightMargin-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.rightMargin</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.top-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.top</span> : <span class="type">AnchorLine</span></p></td></tr>
<tr valign="top" class="odd" id="anchors.topMargin-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.topMargin</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span></p></td></tr>
<tr valign="top" class="odd" id="anchors.verticalCenter-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.verticalCenter</span> : <span class="type">AnchorLine</span></p></td></tr>
<tr valign="top" class="odd" id="anchors.verticalCenterOffset-prop">
<td class="tblQmlPropNode"><p>
<span class="name">anchors.verticalCenterOffset</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></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" translate="no">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 translate="no">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" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-image.html" translate="no">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" translate="no">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" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-image.html" translate="no">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" translate="no">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" translate="no">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 translate="no">undefined</code>.</p>
<p><a href="qml-qtquick-item.html#anchors.alignWhenCentered-prop" translate="no">anchors.alignWhenCentered</a> (default <code translate="no">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" translate="no">width</a> or <a href="qml-qtquick-item.html#height-prop" translate="no">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>
<div class="admonition note">
<p><b>Note: </b>You can only anchor an item to siblings or a parent.</p>
</div>
<p>For more information see <a href="qtquick-positioning-anchors.html" translate="no">Anchor Layouts</a>.</p>
</div></div><!-- @@@anchors -->
<br/>
<!-- $$$antialiasing -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="antialiasing-prop">
<td class="tblQmlPropNode"><p>
<span class="name">antialiasing</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></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" translate="no">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" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="baselineOffset-prop">
<td class="tblQmlPropNode"><p>
<span class="name">baselineOffset</span> : <span class="type"><a href="../qtqml/qml-int.html" translate="no">int</a></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" translate="no">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/>
<!-- $$$childrenRect -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="even" id="childrenRect-prop"><th class="centerAlign"><p><b>childrenRect group</b></p></th></tr>
<tr valign="top" class="odd" id="childrenRect.height-prop">
<td class="tblQmlPropNode"><p>
<span class="name">childrenRect.height</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <code class="details extra" translate="no">[read-only]</code></p></td></tr>
<tr valign="top" class="odd" id="childrenRect.width-prop">
<td class="tblQmlPropNode"><p>
<span class="name">childrenRect.width</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <code class="details extra" translate="no">[read-only]</code></p></td></tr>
<tr valign="top" class="odd" id="childrenRect.x-prop">
<td class="tblQmlPropNode"><p>
<span class="name">childrenRect.x</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <code class="details extra" translate="no">[read-only]</code></p></td></tr>
<tr valign="top" class="odd" id="childrenRect.y-prop">
<td class="tblQmlPropNode"><p>
<span class="name">childrenRect.y</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <code class="details extra" translate="no">[read-only]</code></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This read-only 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>
<p>The geometry that is returned is local to the item. For example:</p>
<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="name">x</span>: <span class="number">50</span>
     <span class="name">y</span>: <span class="number">100</span>

     <span class="comment">// prints: QRectF(-10, -20, 30, 40)</span>
     <span class="name">Component</span>.onCompleted: <span class="name">print</span>(<span class="name">childrenRect</span>)

     <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
         <span class="name">x</span>: -<span class="number">10</span>
         <span class="name">y</span>: -<span class="number">20</span>
         <span class="name">width</span>: <span class="number">30</span>
         <span class="name">height</span>: <span class="number">40</span>
     }
 }
</pre>
</div></div><!-- @@@childrenRect -->
<br/>
<!-- $$$clip -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="clip-prop">
<td class="tblQmlPropNode"><p>
<span class="name">clip</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property holds whether clipping is enabled. The default clip value is <code translate="no">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 class="admonition note">
<p><b>Note: </b>Clipping can affect rendering performance. See <a href="qtquick-visualcanvas-scenegraph-renderer.html#clipping" translate="no">Clipping</a> for more information.</p>
</div>
</div></div><!-- @@@clip -->
<br/>
<!-- $$$containmentMask -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="containmentMask-prop">
<td class="tblQmlPropNode"><p>
<span class="name">containmentMask</span> : <span class="type">QObject</span>*</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property holds an optional mask for the Item to be used in the <a href="qml-qtquick-item.html#contains-method" translate="no">contains</a>() method. Its main use is currently to determine whether a <a href="../qtgui/qpointerevent.html" translate="no">pointer event</a> has landed into the item or not.</p>
<p>By default the <code translate="no">contains()</code> method will return true for any point within the Item's bounding box. <code translate="no">containmentMask</code> allows for more fine-grained control. For example, if a custom C++ <a href="qquickitem.html" translate="no">QQuickItem</a> subclass with a specialized <a href="qml-qtquick-item.html#contains-method" translate="no">contains</a>() method is used as containmentMask:</p>
<pre class="cpp" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> { <span class="name">id</span>: <span class="name">item</span>; <span class="name">containmentMask</span>: <span class="name">AnotherItem</span> { <span class="name">id</span>: <span class="name">anotherItem</span> } }
</pre>
<p><i>item</i>'s contains method would then return <code translate="no">true</code> only if <i>anotherItem</i>'s <a href="qml-qtquick-item.html#contains-method" translate="no">contains</a>() implementation returns <code translate="no">true</code>.</p>
<p>A <a href="qml-qtquick-shapes-shape.html" translate="no">Shape</a> can be used as a mask, to make an item react to <a href="../qtgui/qpointerevent.html" translate="no">pointer events</a> only within a non-rectangular region:</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/containmentMask-shape.gif" alt="" /></p></td><td ><pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">Rectangle</a></span> {
     <span class="name">width</span>: <span class="number">90</span>; <span class="name">height</span>: <span class="number">100</span>
     <span class="name">color</span>: <span class="name">hoverHandler</span>.<span class="name">hovered</span> ? <span class="string">&quot;wheat&quot;</span> : <span class="string">&quot;lightgray&quot;</span>
     <span class="name">containmentMask</span>: <span class="name">shape</span>

     <span class="type"><a href="qml-qtquick-hoverhandler.html" translate="no">HoverHandler</a></span> { <span class="name">id</span>: <span class="name">hoverHandler</span> }

     <span class="type"><a href="qml-qtquick-shapes-shape.html" translate="no">Shape</a></span> {
         <span class="name">id</span>: <span class="name">shape</span>
         <span class="name">containsMode</span>: <span class="name">Shape</span>.<span class="name">FillContains</span>

         <span class="type"><a href="qml-qtquick-shapes-shapepath.html" translate="no">ShapePath</a></span> {
             <span class="name">fillColor</span>: <span class="string">&quot;lightsteelblue&quot;</span>
             <span class="name">startX</span>: <span class="number">10</span>; <span class="name">startY</span>: <span class="number">20</span>
             <span class="type"><a href="qml-qtquick-patharc.html" translate="no">PathArc</a></span> {
                 <span class="name">x</span>: <span class="number">10</span>; <span class="name">y</span>: <span class="number">80</span>
                 <span class="name">radiusX</span>: <span class="number">40</span>; <span class="name">radiusY</span>: <span class="number">40</span>
                 <span class="name">useLargeArc</span>: <span class="number">true</span>
             }
             <span class="type"><a href="qml-qtquick-pathline.html" translate="no">PathLine</a></span> {
                 <span class="name">x</span>: <span class="number">10</span>; <span class="name">y</span>: <span class="number">20</span>
             }
         }
     }
 }
</pre>
</td></tr>
</table></div>
<p>It is also possible to define the contains method in QML. For example, to create a circular item that only responds to events within its actual bounds:</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/containmentMask-circle.gif" alt="" /></p></td><td ><pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">Rectangle</a></span> {
     <span class="name">id</span>: <span class="name">circle</span>
     <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="name">width</span>
     <span class="name">radius</span>: <span class="name">width</span> <span class="operator">/</span> <span class="number">2</span>
     <span class="name">color</span>: <span class="name">tapHandler</span>.<span class="name">pressed</span> ? <span class="string">&quot;tomato&quot;</span> : <span class="name">hoverHandler</span>.<span class="name">hovered</span> ? <span class="string">&quot;darkgray&quot;</span> : <span class="string">&quot;lightgray&quot;</span>

     <span class="type"><a href="qml-qtquick-taphandler.html" translate="no">TapHandler</a></span> { <span class="name">id</span>: <span class="name">tapHandler</span> }
     <span class="type"><a href="qml-qtquick-hoverhandler.html" translate="no">HoverHandler</a></span> { <span class="name">id</span>: <span class="name">hoverHandler</span> }

     <span class="name">containmentMask</span>: <span class="name">QtObject</span> {
         property <span class="type">alias</span> <span class="name">radius</span>: <span class="name">circle</span>.<span class="name">radius</span>
         <span class="keyword">function </span><span class="name">contains</span>(point: <span class="name">point</span>) : bool {
             <span class="keyword">return</span> (<span class="name">Math</span>.<span class="name">pow</span>(<span class="name">point</span>.<span class="name">x</span> <span class="operator">-</span> <span class="name">radius</span>, <span class="number">2</span>) <span class="operator">+</span> <span class="name">Math</span>.<span class="name">pow</span>(<span class="name">point</span>.<span class="name">y</span> <span class="operator">-</span> <span class="name">radius</span>, <span class="number">2</span>)) <span class="operator">&lt;</span> <span class="name">Math</span>.<span class="name">pow</span>(<span class="name">radius</span>, <span class="number">2</span>)
         }
     }
 }
</pre>
</td></tr>
</table></div>
<p><b>See also </b><a href="qtquick-shapes-example.html" translate="no">Qt Quick Examples - Shapes</a>.</p>
</div></div><!-- @@@containmentMask -->
<br/>
<!-- $$$data -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="data-prop">
<td class="tblQmlPropNode"><p>
<span class="name">data</span> : <span class="type"><a href="../qtqml/qml-list.html" translate="no">list</a></span>&lt;<span class="type"><a href="../qtqml/qml-qtqml-qtobject.html" translate="no">QtObject</a></span>&gt; <code class="details extra" translate="no">[default]</code></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" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-text.html" translate="no">Text</a></span> {}
     <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">Rectangle</a></span> {}
     <span class="type"><a href="../qtqml/qml-qtqml-timer.html" translate="no">Timer</a></span> {}
 }
</pre>
<p>instead of:</p>
<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="name">children</span>: [
         <span class="type"><a href="qml-qtquick-text.html" translate="no">Text</a></span> {},
         <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">Rectangle</a></span> {}
     ]
     <span class="name">resources</span>: [
         <span class="type"><a href="../qtqml/qml-qtqml-timer.html" translate="no">Timer</a></span> {}
     ]
 }
</pre>
<p>It should not generally be necessary to refer to the <code translate="no">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" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="enabled-prop">
<td class="tblQmlPropNode"><p>
<span class="name">enabled</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></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 translate="no">enabled</code> value of child items. When set to <code translate="no">false</code>, the <code translate="no">enabled</code> values of all child items also become <code translate="no">false</code>. When set to <code translate="no">true</code>, the <code translate="no">enabled</code> values of child items are returned to <code translate="no">true</code>, unless they have explicitly been set to <code translate="no">false</code>.</p>
<p>Setting this property to <code translate="no">false</code> automatically causes <a href="qml-qtquick-item.html#activeFocus-prop" translate="no">activeFocus</a> to be set to <code translate="no">false</code>, and this item will no longer receive keyboard events.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#visible-prop" translate="no">visible</a>.</p>
</div></div><!-- @@@enabled -->
<br/>
<!-- $$$focus -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="focus-prop">
<td class="tblQmlPropNode"><p>
<span class="name">focus</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></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" translate="no">FocusScope</a>. If true, this item will gain active focus when the enclosing <a href="qml-qtquick-focusscope.html" translate="no">FocusScope</a> gains active focus.</p>
<p>In the following example, <code translate="no">input</code> will be given active focus when <code translate="no">scope</code> gains active focus:</p>
<pre class="qml" translate="no">
 import QtQuick 2.0

 <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">FocusScope</a></span> {
         <span class="name">id</span>: <span class="name">scope</span>

         <span class="type"><a href="qml-qtquick-textinput.html" translate="no">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 translate="no">input</code> on startup.</p>
<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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" translate="no">activeFocus</a> and <a href="qtquick-input-focus.html" translate="no">Keyboard Focus in Qt Quick</a>.</p>
</div></div><!-- @@@focus -->
<br/>
<!-- $$$focusPolicy -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="focusPolicy-prop">
<td class="tblQmlPropNode"><p>
<span class="name">focusPolicy</span> : <span class="type"><a href="../qtqml/qml-enumeration.html" translate="no">enumeration</a></span> <code class="details extra" translate="no">[since 6.7]</code></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property determines the way the item accepts focus.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code translate="no">Qt.TabFocus</code></td><td class="topAlign">The item accepts focus by tabbing.</td></tr>
<tr><td class="topAlign"><code translate="no">Qt.ClickFocus</code></td><td class="topAlign">The item accepts focus by clicking.</td></tr>
<tr><td class="topAlign"><code translate="no">Qt.StrongFocus</code></td><td class="topAlign">The item accepts focus by both tabbing and clicking.</td></tr>
<tr><td class="topAlign"><code translate="no">Qt.WheelFocus</code></td><td class="topAlign">The item accepts focus by tabbing, clicking, and using the mouse wheel.</td></tr>
<tr><td class="topAlign"><code translate="no">Qt.NoFocus</code></td><td class="topAlign">The item does not accept focus.</td></tr>
</table></div>
<div class="admonition note">
<p><b>Note: </b>This property was a member of Control until Qt 6.7.</p>
</div>
<p>This property was introduced in Qt 6.7.</p>
</div></div><!-- @@@focusPolicy -->
<br/>
<!-- $$$layer.effect -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.effect-prop">
<td class="tblQmlPropNode"><p>
<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" translate="no">ShaderEffect</a> component, although any <a href="qml-qtquick-item.html" translate="no">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" translate="no">layer.samplerName</a>.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#layer.samplerName-prop" translate="no">layer.samplerName</a> and <a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.effect -->
<br/>
<!-- $$$layer.enabled -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.enabled-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.enabled</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></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>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.enabled -->
<br/>
<!-- $$$layer.format -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.format-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.format</span> : <span class="type"><a href="../qtqml/qml-enumeration.html" translate="no">enumeration</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property defines the format of the backing texture. Modifying this property makes most sense when the <i translate="no">layer.effect</i> is also specified.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.RGBA8</code></td><td class="topAlign">&nbsp;</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.RGBA16F</code></td><td class="topAlign">&nbsp;</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.RGBA32F</code></td><td class="topAlign">&nbsp;</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.Alpha</code></td><td class="topAlign">Starting with Qt 6.0, this value is not in use and has the same effect as <code translate="no">RGBA8</code> in practice.</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.RGB</code></td><td class="topAlign">Starting with Qt 6.0, this value is not in use and has the same effect as <code translate="no">RGBA8</code> in practice.</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.RGBA</code></td><td class="topAlign">Starting with Qt 6.0, this value is not in use and has the same effect as <code translate="no">RGBA8</code> in practice.</td></tr>
</table></div>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.format -->
<br/>
<!-- $$$layer.live -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.live-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.live</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></span> <code class="details extra" translate="no">[since 6.5]</code></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>When this property is true the layer texture is updated whenever the item updates. Otherwise it will always be a frozen image.</p>
<p>By default, this property is set to <code translate="no">true</code>.</p>
<p>This property was introduced in Qt 6.5.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.live -->
<br/>
<!-- $$$layer.mipmap -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.mipmap-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.mipmap</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>If this property is true, mipmaps are generated for the texture.</p>
<div class="admonition note">
<p><b>Note: </b>Some OpenGL ES 2 implementations do not support mipmapping of non-power-of-two textures.</p>
</div>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.mipmap -->
<br/>
<!-- $$$layer.samplerName -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.samplerName-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.samplerName</span> : <span class="type"><a href="../qtqml/qml-string.html" translate="no">string</a></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" translate="no">layer.effect</a>, <a href="qml-qtquick-shadereffect.html" translate="no">ShaderEffect</a>, and <a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.samplerName -->
<br/>
<!-- $$$layer.samples -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.samples-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.samples</span> : <span class="type"><a href="../qtqml/qml-enumeration.html" translate="no">enumeration</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property allows requesting multisampled rendering in the layer.</p>
<p>By default multisampling is enabled whenever multisampling is enabled for the entire window, assuming the scenegraph renderer in use and the underlying graphics API supports this.</p>
<p>By setting the value to 2, 4, etc. multisampled rendering can be requested for a part of the scene without enabling multisampling for the entire scene. This way multisampling is applied only to a given subtree, which can lead to significant performance gains since multisampling is not applied to other parts of the scene.</p>
<div class="admonition note">
<p><b>Note: </b>Enabling multisampling can be potentially expensive regardless of the layer's size, as it incurs a hardware and driver dependent performance and memory cost.</p>
</div>
<div class="admonition note">
<p><b>Note: </b>This property is only functional when support for multisample renderbuffers and framebuffer blits is available. Otherwise the value is silently ignored.</p>
</div>
</div></div><!-- @@@layer.samples -->
<br/>
<!-- $$$layer.smooth -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.smooth-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.smooth</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Holds whether the layer is smoothly transformed. When enabled, sampling the layer's texture is performed using <code translate="no">linear</code> interpolation, while non-smooth results in using the <code translate="no">nearest</code> filtering mode.</p>
<p>By default, this property is set to <code translate="no">false</code>.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.smooth -->
<br/>
<!-- $$$layer.sourceRect -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.sourceRect-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.sourceRect</span> : <span class="type"><a href="../qtqml/qml-rect.html" translate="no">rect</a></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>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.sourceRect -->
<br/>
<!-- $$$layer.textureMirroring -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.textureMirroring-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.textureMirroring</span> : <span class="type"><a href="../qtqml/qml-enumeration.html" translate="no">enumeration</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property defines how the generated texture should be mirrored. The default value is <code translate="no">ShaderEffectSource.MirrorVertically</code>. Custom mirroring can be useful if the generated texture is directly accessed by custom shaders, such as those specified by <a href="qml-qtquick-shadereffect.html" translate="no">ShaderEffect</a>. If no effect is specified for the layered item, mirroring has no effect on the UI representation of the item.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.NoMirroring</code></td><td class="topAlign">No mirroring</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.MirrorHorizontally</code></td><td class="topAlign">The generated texture is flipped along X-axis.</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.MirrorVertically</code></td><td class="topAlign">The generated texture is flipped along Y-axis.</td></tr>
</table></div>
</div></div><!-- @@@layer.textureMirroring -->
<br/>
<!-- $$$layer.textureSize -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.textureSize-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.textureSize</span> : <span class="type"><a href="../qtqml/qml-size.html" translate="no">size</a></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>
<div class="admonition note">
<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>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.textureSize -->
<br/>
<!-- $$$layer.wrapMode -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.wrapMode-prop">
<td class="tblQmlPropNode"><p>
<span class="name">layer.wrapMode</span> : <span class="type"><a href="../qtqml/qml-enumeration.html" translate="no">enumeration</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property defines the wrap modes associated with the texture. Modifying this property makes most sense when the <i translate="no">layer.effect</i> is specified.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.ClampToEdge</code></td><td class="topAlign">GL_CLAMP_TO_EDGE both horizontally and vertically</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.RepeatHorizontally</code></td><td class="topAlign">GL_REPEAT horizontally, GL_CLAMP_TO_EDGE vertically</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.RepeatVertically</code></td><td class="topAlign">GL_CLAMP_TO_EDGE horizontally, GL_REPEAT vertically</td></tr>
<tr><td class="topAlign"><code translate="no">ShaderEffectSource.Repeat</code></td><td class="topAlign">GL_REPEAT both horizontally and vertically</td></tr>
</table></div>
<div class="admonition note">
<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>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers" translate="no">Item Layers</a>.</p>
</div></div><!-- @@@layer.wrapMode -->
<br/>
<!-- $$$opacity -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="opacity-prop">
<td class="tblQmlPropNode"><p>
<span class="name">opacity</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></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.</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" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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" translate="no">visible</a> property to <code translate="no">false</code> stops mouse events, and setting the <a href="qml-qtquick-item.html#enabled-prop" translate="no">enabled</a> property to <code translate="no">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" translate="no">visible</a>.</p>
</div></div><!-- @@@opacity -->
<br/>
<!-- $$$palette -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="palette-prop">
<td class="tblQmlPropNode"><p>
<span class="name">palette</span> : <span class="type"><a href="qml-qtquick-palette.html" translate="no">Palette</a></span> <code class="details extra" translate="no">[since 6.0]</code></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property holds the palette currently set for the item.</p>
<p>This property describes the item's requested palette. The palette is used by the item's style when rendering all controls, and is available as a means to ensure that custom controls can maintain consistency with the native platform's native look and feel. It's common that different platforms, or different styles, define different palettes for an application.</p>
<p>The default palette depends on the system environment. <a href="../qtquickcontrols/qml-qtquick-controls-applicationwindow.html" translate="no">ApplicationWindow</a> maintains a system/theme palette which serves as a default for all controls. There may also be special palette defaults for certain types of controls. You can also set the default palette for controls by either:</p>
<ul>
<li>passing a custom palette to <a href="../qtgui/qguiapplication.html#setPalette" translate="no">QGuiApplication::setPalette</a>(), before loading any QML; or</li>
<li>specifying the colors in the <a href="../qtquickcontrols/qtquickcontrols-configuration.html" translate="no">qtquickcontrols2.conf file</a>.</li>
</ul>
<p>Items propagate explicit palette properties from parents to children. If you change a specific property on a items's palette, that property propagates to all of the item's children, overriding any system defaults for that property.</p>
<pre class="cpp" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type">palette</span> {
         <span class="name">buttonText</span>: <span class="string">&quot;maroon&quot;</span>
         <span class="name">button</span>: <span class="string">&quot;lavender&quot;</span>
     }

     <span class="type"><a href="../qtquickcontrols/qml-qtquick-controls-button.html" translate="no">Button</a></span> {
         <span class="name">text</span>: <span class="string">&quot;Click Me&quot;</span>
     }
 }
</pre>
<p>This property was introduced in Qt 6.0.</p>
<p><b>See also </b><a href="qml-qtquick-window.html#palette-prop" translate="no">Window::palette</a>, <a href="../qtquickcontrols/qml-qtquick-controls-popup.html#palette-prop" translate="no">Popup::palette</a>, <a href="qml-qtquick-colorgroup.html" translate="no">ColorGroup</a>, <a href="qml-qtquick-palette.html" translate="no">Palette</a>, and <a href="qml-qtquick-systempalette.html" translate="no">SystemPalette</a>.</p>
</div></div><!-- @@@palette -->
<br/>
<!-- $$$parent -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="parent-prop">
<td class="tblQmlPropNode"><p>
<span class="name">parent</span> : <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This property holds the visual parent of the item.</p>
<div class="admonition note">
<p><b>Note: </b>The concept of the <i>visual parent</i> differs from that of the <i><a href="../qtcore/qobject.html" translate="no">QObject</a> parent</i>. An item's visual parent may not necessarily be the same as its object parent. See <a href="qtquick-visualcanvas-visualparent.html" translate="no">Concepts - Visual Parent in Qt Quick</a> for more details.</p>
</div>
</div></div><!-- @@@parent -->
<br/>
<!-- $$$rotation -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="rotation-prop">
<td class="tblQmlPropNode"><p>
<span class="name">rotation</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></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" translate="no">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" translate="no">
 <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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" translate="no">Transform</a> and <a href="qml-qtquick-rotation.html" translate="no">Rotation</a>.</p>
</div></div><!-- @@@rotation -->
<br/>
<!-- $$$scale -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="scale-prop">
<td class="tblQmlPropNode"><p>
<span class="name">scale</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></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.</p>
<p>Scaling is applied from the <a href="qml-qtquick-item.html#transformOrigin-prop" translate="no">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" translate="no">
 import QtQuick 2.0

 <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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" translate="no">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>
         <span class="name">transformOrigin</span>: <span class="name">Item</span>.<span class="name">TopLeft</span>
     }
 }
</pre>
</td></tr>
</table></div>
<p><b>See also </b><a href="qml-qtquick-transform.html" translate="no">Transform</a> and <a href="qml-qtquick-scale.html" translate="no">Scale</a>.</p>
</div></div><!-- @@@scale -->
<br/>
<!-- $$$smooth -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="smooth-prop">
<td class="tblQmlPropNode"><p>
<span class="name">smooth</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></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, this property is set to <code translate="no">true</code>.</p>
</div></div><!-- @@@smooth -->
<br/>
<!-- $$$state -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="state-prop">
<td class="tblQmlPropNode"><p>
<span class="name">state</span> : <span class="type"><a href="../qtqml/qml-string.html" translate="no">string</a></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" translate="no">Qt Quick States</a>.</p>
</div></div><!-- @@@state -->
<br/>
<!-- $$$states -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="states-prop">
<td class="tblQmlPropNode"><p>
<span class="name">states</span> : <span class="type"><a href="../qtqml/qml-list.html" translate="no">list</a></span>&lt;<span class="type"><a href="qml-qtquick-state.html" translate="no">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" translate="no">state</a> property to one of these states, or set the <a href="qml-qtquick-item.html#state-prop" translate="no">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" translate="no">State</a> objects. For example, below is an item with &quot;red_color&quot; and &quot;blue_color&quot; states:</p>
<pre class="qml" translate="no">
 import QtQuick 2.0

 <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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" translate="no">PropertyChanges</a></span> { <span class="name">root</span>.color: <span class="string">&quot;red&quot;</span> }
         },
         <span class="type"><a href="qml-qtquick-state.html" translate="no">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" translate="no">PropertyChanges</a></span> { <span class="name">root</span>.color: <span class="string">&quot;blue&quot;</span> }
         }
     ]
 }
</pre>
<p>See <a href="qtquick-statesanimations-states.html" translate="no">Qt Quick States</a> and <a href="qtquick-statesanimations-animations.html" translate="no">Animation and Transitions in Qt Quick</a> for more details on using states and transitions.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#transitions-prop" translate="no">transitions</a>.</p>
</div></div><!-- @@@states -->
<br/>
<!-- $$$transform -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="transform-prop">
<td class="tblQmlPropNode"><p>
<span class="name">transform</span> : <span class="type"><a href="../qtqml/qml-list.html" translate="no">list</a></span>&lt;<span class="type"><a href="qml-qtquick-transform.html" translate="no">Transform</a></span>&gt; <code class="details extra" translate="no">[read-only]</code></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" translate="no">Transform</a>.</p>
</div></div><!-- @@@transform -->
<br/>
<!-- $$$transformOrigin -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="transformOrigin-prop">
<td class="tblQmlPropNode"><p>
<span class="name">transformOrigin</span> : <span class="type"><a href="../qtqml/qml-enumeration.html" translate="no">enumeration</a></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 translate="no">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" translate="no">
 <span class="type"><a href="qml-qtquick-image.html" translate="no">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" translate="no">Scale</a> or <a href="qml-qtquick-rotation.html" translate="no">Rotation</a> transform types with <a href="qml-qtquick-item.html#transform-prop" translate="no">transform</a>.</p>
</div></div><!-- @@@transformOrigin -->
<br/>
<!-- $$$transitions -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="transitions-prop">
<td class="tblQmlPropNode"><p>
<span class="name">transitions</span> : <span class="type"><a href="../qtqml/qml-list.html" translate="no">list</a></span>&lt;<span class="type"><a href="qml-qtquick-transition.html" translate="no">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" translate="no">state</a>.</p>
<p>This property is specified as a list of <a href="qml-qtquick-transition.html" translate="no">Transition</a> objects. For example:</p>
<pre class="qml" translate="no">
 import QtQuick 2.0

 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="name">transitions</span>: [
         <span class="type"><a href="qml-qtquick-transition.html" translate="no">Transition</a></span> {
             <span class="comment">//...</span>
         },
         <span class="type"><a href="qml-qtquick-transition.html" translate="no">Transition</a></span> {
             <span class="comment">//...</span>
         }
     ]
 }
</pre>
<p>See <a href="qtquick-statesanimations-states.html" translate="no">Qt Quick States</a> and <a href="qtquick-statesanimations-animations.html" translate="no">Animation and Transitions in Qt Quick</a> for more details on using states and transitions.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#states-prop" translate="no">states</a>.</p>
</div></div><!-- @@@transitions -->
<br/>
<!-- $$$visible -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="visible-prop">
<td class="tblQmlPropNode"><p>
<span class="name">visible</span> : <span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></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 translate="no">visible</code> value of child items. When set to <code translate="no">false</code>, the <code translate="no">visible</code> values of all child items also become <code translate="no">false</code>. When set to <code translate="no">true</code>, the <code translate="no">visible</code> values of child items are returned to <code translate="no">true</code>, unless they have explicitly been set to <code translate="no">false</code>.</p>
<p>(Because of this flow-on behavior, using the <code translate="no">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="qml-qtquick-item.html#opacity-prop" translate="no">opacity</a> property instead.)</p>
<p>If this property is set to <code translate="no">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" translate="no">focus</a> if it has been set. (In contrast, setting the <a href="qml-qtquick-item.html#enabled-prop" translate="no">enabled</a> property to <code translate="no">false</code> stops both mouse and keyboard events, and also removes focus from the item.)</p>
<div class="admonition note">
<p><b>Note: </b>This property's value is only affected by changes to this property or the parent's <code translate="no">visible</code> property. It does not change, for example, if this item moves off-screen, or if the <a href="qml-qtquick-item.html#opacity-prop" translate="no">opacity</a> changes to 0.</p>
</div>
<p><b>See also </b><a href="qml-qtquick-item.html#opacity-prop" translate="no">opacity</a> and <a href="qml-qtquick-item.html#enabled-prop" translate="no">enabled</a>.</p>
</div></div><!-- @@@visible -->
<br/>
<!-- $$$visibleChildren -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="visibleChildren-prop">
<td class="tblQmlPropNode"><p>
<span class="name">visibleChildren</span> : <span class="type"><a href="../qtqml/qml-list.html" translate="no">list</a></span>&lt;<span class="type"><a href="qml-qtquick-item.html" translate="no">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/>
<!-- $$$z -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="z-prop">
<td class="tblQmlPropNode"><p>
<span class="name">z</span> : <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></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 translate="no">z</code> - later children above earlier children:<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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 translate="no">z</code> on top:<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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 translate="no">z</code> - children above parents:<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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 translate="no">z</code> below:<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> {
     <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">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" translate="no">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>
<!-- $$$ -->
<div class="qmlitem"><div class="fngroup">
<div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapFromItem-method-1">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-point.html" translate="no">point</a></span> <span class="name">mapFromItem</span>(<span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> <i>item</i>, <span class="type"><a href="../qtqml/qml-point.html" translate="no">point</a></span> <i>p</i>)</p></td></tr>
<tr valign="top" class="odd" id="mapFromItem-method">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-point.html" translate="no">point</a></span> <span class="name">mapFromItem</span>(<span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> <i>item</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>x</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>y</i>)</p></td></tr>
<tr valign="top" class="odd" id="mapFromItem-method-2">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-rect.html" translate="no">rect</a></span> <span class="name">mapFromItem</span>(<span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> <i>item</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>x</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>y</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>width</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>height</i>)</p></td></tr>
<tr valign="top" class="odd" id="mapFromItem-method-3">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-rect.html" translate="no">rect</a></span> <span class="name">mapFromItem</span>(<span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> <i>item</i>, <span class="type"><a href="../qtqml/qml-rect.html" translate="no">rect</a></span> <i>r</i>)</p></td></tr>
</table></div></div>
</div><div class="qmldoc"><p>Maps the point (<i translate="no">x</i>, <i translate="no">y</i>) or rect (<i translate="no">x</i>, <i translate="no">y</i>, <i translate="no">width</i>, <i translate="no">height</i>), which is in <i translate="no">item</i>'s coordinate system, to this item's coordinate system, and returns a <a href="../qtqml/qml-point.html" translate="no">point</a> or <a href="../qtqml/qml-rect.html" translate="no">rect</a> matching the mapped coordinate.</p>
<p>The following properties of the item are used in the mapping: <a href="qml-qtquick-item.html#x-prop" translate="no">x</a>, <a href="qml-qtquick-item.html#y-prop" translate="no">y</a>, <a href="qml-qtquick-item.html#scale-prop" translate="no">scale</a>, <a href="qml-qtquick-item.html#rotation-prop" translate="no">rotation</a>, <a href="qml-qtquick-item.html#transformOrigin-prop" translate="no">transformOrigin</a>, and <a href="qml-qtquick-item.html#transform-prop" translate="no">transform</a>.</p>
<p>If the items are part of different scenes, the mapping includes the relative position of the two scenes.</p>
<p>If <i translate="no">item</i> is a <code translate="no">null</code> value, this maps the point or rect from the coordinate system of the <a href="qtquick-visualcanvas-coordinates.html#scene-coordinates" translate="no">scene</a>.</p>
<p>The versions accepting point and rect are since Qt 5.15.</p>
</div></div><!-- @@@ -->
<br/>
<!-- $$$ -->
<div class="qmlitem"><div class="fngroup">
<div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapToItem-method-1">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-point.html" translate="no">point</a></span> <span class="name">mapToItem</span>(<span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> <i>item</i>, <span class="type"><a href="../qtqml/qml-point.html" translate="no">point</a></span> <i>p</i>)</p></td></tr>
<tr valign="top" class="odd" id="mapToItem-method">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-point.html" translate="no">point</a></span> <span class="name">mapToItem</span>(<span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> <i>item</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>x</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>y</i>)</p></td></tr>
<tr valign="top" class="odd" id="mapToItem-method-2">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-rect.html" translate="no">rect</a></span> <span class="name">mapToItem</span>(<span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> <i>item</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>x</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>y</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>width</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>height</i>)</p></td></tr>
<tr valign="top" class="odd" id="mapToItem-method-3">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-rect.html" translate="no">rect</a></span> <span class="name">mapToItem</span>(<span class="type"><a href="qml-qtquick-item.html" translate="no">Item</a></span> <i>item</i>, <span class="type"><a href="../qtqml/qml-rect.html" translate="no">rect</a></span> <i>r</i>)</p></td></tr>
</table></div></div>
</div><div class="qmldoc"><p>Maps the point (<i translate="no">x</i>, <i translate="no">y</i>) or rect (<i translate="no">x</i>, <i translate="no">y</i>, <i translate="no">width</i>, <i translate="no">height</i>), which is in this item's coordinate system, to <i translate="no">item</i>'s coordinate system, and returns a <a href="../qtqml/qml-point.html" translate="no">point</a> or <a href="../qtqml/qml-rect.html" translate="no">rect</a> matching the mapped coordinate.</p>
<p>The following properties of the item are used in the mapping: <a href="qml-qtquick-item.html#x-prop" translate="no">x</a>, <a href="qml-qtquick-item.html#y-prop" translate="no">y</a>, <a href="qml-qtquick-item.html#scale-prop" translate="no">scale</a>, <a href="qml-qtquick-item.html#rotation-prop" translate="no">rotation</a>, <a href="qml-qtquick-item.html#transformOrigin-prop" translate="no">transformOrigin</a>, and <a href="qml-qtquick-item.html#transform-prop" translate="no">transform</a>.</p>
<p>If the items are part of different scenes, the mapping includes the relative position of the two scenes.</p>
<p>If <i translate="no">item</i> is a <code translate="no">null</code> value, this maps the point or rect to the coordinate system of the <a href="qtquick-visualcanvas-coordinates.html#scene-coordinates" translate="no">scene</a>.</p>
<p>The versions accepting point and rect are since Qt 5.15.</p>
</div></div><!-- @@@ -->
<br/>
<!-- $$$childAt[overload1]$$$childAtrealreal -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="childAt-method">
<td class="tblQmlFuncNode"><p>
<span class="name">childAt</span>(<span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>x</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>y</i>)</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Returns the first visible child item found at point (<i translate="no">x</i>, <i translate="no">y</i>) within the coordinate system of this item.</p>
<p>Returns <code translate="no">null</code> if there is no such item.</p>
</div></div><!-- @@@childAt -->
<br/>
<!-- $$$contains[overload1]$$$containspoint -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="contains-method">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></span> <span class="name">contains</span>(<span class="type"><a href="../qtqml/qml-point.html" translate="no">point</a></span> <i>point</i>)</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Returns <code translate="no">true</code> if this item contains <i translate="no">point</i>, which is in local coordinates; returns <code translate="no">false</code> otherwise. This is the same check that is used for hit-testing a <a href="../qtgui/qeventpoint.html" translate="no">QEventPoint</a> during event delivery, and is affected by <a href="qml-qtquick-item.html#containmentMask-prop" translate="no">containmentMask</a> if it is set.</p>
</div></div><!-- @@@contains -->
<br/>
<!-- $$$dumpItemTree[overload1]$$$dumpItemTree -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="dumpItemTree-method">
<td class="tblQmlFuncNode"><p>
<code class="details extra" translate="no">[since 6.3]</code> <span class="name">dumpItemTree</span>()</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Dumps some details about the <a href="qtquick-visualcanvas-visualparent.html" translate="no">visual tree of Items</a> starting with this item and its children, recursively.</p>
<p>The output looks similar to that of this QML code:</p>
<pre class="qml" translate="no">
 function dump(object, indent) {
     console.log(indent + object)
     for (const i in object.children)
         dump(object.children[i], indent + &quot;    &quot;)
 }

 dump(myItem, &quot;&quot;)
</pre>
<p>So if you want more details, you can implement your own function and add extra output to the console.log, such as values of specific properties.</p>
<p>This method was introduced in Qt 6.3.</p>
<p><b>See also </b><a href="../qtcore/qobject.html#dumpObjectTree" translate="no">QObject::dumpObjectTree</a>().</p>
</div></div><!-- @@@dumpItemTree -->
<br/>
<!-- $$$forceActiveFocus[overload1]$$$forceActiveFocus -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="forceActiveFocus-method">
<td class="tblQmlFuncNode"><p>
<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" translate="no">FocusScope</a> objects in the object hierarchy are also given <a href="qml-qtquick-item.html#focus-prop" translate="no">focus</a>.</p>
<p>The reason for the focus change will be <a href="../qtcore/qt.html#FocusReason-enum" translate="no">Qt::OtherFocusReason</a>. 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" translate="no">activeFocus</a>.</p>
</div></div><!-- @@@forceActiveFocus -->
<br/>
<!-- $$$forceActiveFocus$$$forceActiveFocusQt::FocusReason -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="forceActiveFocus-method-1">
<td class="tblQmlFuncNode"><p>
<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 translate="no">reason</i>.</p>
<p>This method sets focus on the item and ensures that all ancestor <a href="qml-qtquick-focusscope.html" translate="no">FocusScope</a> objects in the object hierarchy are also given <a href="qml-qtquick-item.html#focus-prop" translate="no">focus</a>.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#activeFocus-prop" translate="no">activeFocus</a> and <a href="../qtcore/qt.html#FocusReason-enum" translate="no">Qt::FocusReason</a>.</p>
</div></div><!-- @@@forceActiveFocus -->
<br/>
<!-- $$$grabToImage[overload1]$$$grabToImage -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="grabToImage-method">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></span> <span class="name">grabToImage</span>(<i>callback</i>, <i>targetSize</i>)</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 translate="no">callback</i> is invoked when the grab is completed. The callback takes one argument, which is the result of the grab operation; an <a href="qml-qtquick-itemgrabresult.html" translate="no">ItemGrabResult</a> object.</p>
<p>Use <i translate="no">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 translate="no">false</code>.</p>
<p>The following snippet shows how to grab an item and store the results in a file:</p>
<pre class="qml" translate="no">
 <span class="type"><a href="qml-qtquick-rectangle.html" translate="no">Rectangle</a></span> {
     <span class="name">id</span>: <span class="name">sourceRectangle</span>
     <span class="name">width</span>: <span class="number">100</span>
     <span class="name">height</span>: <span class="number">100</span>
     <span class="name">focus</span>: <span class="number">true</span>
     <span class="name">gradient</span>: <span class="name">Gradient</span> {
         <span class="type"><a href="qml-qtquick-gradientstop.html" translate="no">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" translate="no">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="name">Keys</span>.onSpacePressed: {
         <span class="name">sourceRectangle</span>.<span class="name">grabToImage</span>(<span class="keyword">function</span>(result) {
            <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" translate="no">
 <span class="type"><a href="qml-qtquick-image.html" translate="no">Image</a></span> {
     <span class="name">id</span>: <span class="name">image</span>
 }

 <span class="name">Keys</span>.onSpacePressed: {
     <span class="name">sourceRectangle</span>.<span class="name">grabToImage</span>(<span class="keyword">function</span>(result) {
         <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>
<div class="admonition note">
<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" translate="no">layers</a> or <a href="qml-qtquick-shadereffectsource.html" translate="no">ShaderEffectSource</a>.</p>
</div>
</div></div><!-- @@@grabToImage -->
<br/>
<!-- $$$mapFromGlobal[overload1]$$$mapFromGlobalrealreal -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapFromGlobal-method">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-point.html" translate="no">point</a></span> <span class="name">mapFromGlobal</span>(<span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>x</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>y</i>)</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Maps the point (<i translate="no">x</i>, <i translate="no">y</i>), which is in the global coordinate system, to the item's coordinate system, and returns a <a href="../qtqml/qml-point.html" translate="no">point</a> matching the mapped coordinate.</p>
<p>The following properties of the item are used in the mapping: <a href="qml-qtquick-item.html#x-prop" translate="no">x</a>, <a href="qml-qtquick-item.html#y-prop" translate="no">y</a>, <a href="qml-qtquick-item.html#scale-prop" translate="no">scale</a>, <a href="qml-qtquick-item.html#rotation-prop" translate="no">rotation</a>, <a href="qml-qtquick-item.html#transformOrigin-prop" translate="no">transformOrigin</a>, and <a href="qml-qtquick-item.html#transform-prop" translate="no">transform</a>.</p>
<p>If the items are part of different scenes, the mapping includes the relative position of the two scenes.</p>
</div></div><!-- @@@mapFromGlobal -->
<br/>
<!-- $$$mapToGlobal[overload1]$$$mapToGlobalrealreal -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapToGlobal-method">
<td class="tblQmlFuncNode"><p>
<span class="type"><a href="../qtqml/qml-point.html" translate="no">point</a></span> <span class="name">mapToGlobal</span>(<span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>x</i>, <span class="type"><a href="../qtqml/qml-real.html" translate="no">real</a></span> <i>y</i>)</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Maps the point (<i translate="no">x</i>, <i translate="no">y</i>), which is in this item's coordinate system, to the global coordinate system, and returns a <a href="../qtqml/qml-point.html" translate="no">point</a> matching the mapped coordinate.</p>
<p>The following properties of the item are used in the mapping: <a href="qml-qtquick-item.html#x-prop" translate="no">x</a>, <a href="qml-qtquick-item.html#y-prop" translate="no">y</a>, <a href="qml-qtquick-item.html#scale-prop" translate="no">scale</a>, <a href="qml-qtquick-item.html#rotation-prop" translate="no">rotation</a>, <a href="qml-qtquick-item.html#transformOrigin-prop" translate="no">transformOrigin</a>, and <a href="qml-qtquick-item.html#transform-prop" translate="no">transform</a>.</p>
<p>If the items are part of different scenes, the mapping includes the relative position of the two scenes.</p>
</div></div><!-- @@@mapToGlobal -->
<br/>
<!-- $$$nextItemInFocusChain[overload1]$$$nextItemInFocusChainbool -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="nextItemInFocusChain-method">
<td class="tblQmlFuncNode"><p>
<span class="name">nextItemInFocusChain</span>(<span class="type"><a href="../qtqml/qml-bool.html" translate="no">bool</a></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 translate="no">forward</i> is <code translate="no">true</code>, or not supplied, it is the next item in the forwards direction. If <i translate="no">forward</i> is <code translate="no">false</code>, it is the next item in the backwards direction.</p>
</div></div><!-- @@@nextItemInFocusChain -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2024 <span translate="no">The Qt Company Ltd.</span>
   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 <span translate="no">Free Software Foundation</span>.<br/>    <span translate="no">Qt</span> and respective logos are <a href="https://doc.qt.io/qt/trademarks.html">    trademarks</a> of <span translate="no">The Qt Company Ltd.</span> in Finland and/or other countries
   worldwide. All other trademarks are property of their respective owners. </p>
</div>
</body>
</html>