Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates > by-pkgid > 6e2327ca1c896c6d674ae53117299f21 > files > 955

qtdeclarative5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickitem.cpp -->
  <title>Item QML Type | Qt Quick 5.12.6</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">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtquick-index.html">Qt Quick</a></td><td ><a href="qtquick-qmlmodule.html">QML Types</a></td><td >Item QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtquick-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#item-layers">Item Layers</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Item QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Item-brief -->
<p>A basic visual QML type. <a href="#details">More...</a></p>
<!-- @@@Item -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtQuick 2.12</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="qml-qtquick-item.html"><a href="qquickitem.html">QQuickItem</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qtquick-animatedsprite.html">AnimatedSprite</a>, <a href="qml-qtquick-borderimage.html">BorderImage</a>, <a href="qml-qtquick-canvas.html">Canvas</a>, <a href="qml-qtquick-column.html">Column</a>, <a href="qml-qtquick-layouts-columnlayout.html">ColumnLayout</a>, <a href="qml-qtquick-flickable.html">Flickable</a>, <a href="qml-qtquick-flipable.html">Flipable</a>, <a href="qml-qtquick-flow.html">Flow</a>, <a href="qml-qtquick-focusscope.html">FocusScope</a>, <a href="qml-qtquick-grid.html">Grid</a>, <a href="qml-qtquick-layouts-gridlayout.html">GridLayout</a>, <a href="qml-qtquick-image.html">Image</a>, <a href="qml-qtquick-loader.html">Loader</a>, <a href="qml-qtquick-mousearea.html">MouseArea</a>, <a href="qml-qtquick-multipointtoucharea.html">MultiPointTouchArea</a>, <a href="qml-qtquick-particles-particlepainter.html">ParticlePainter</a>, <a href="qml-qtquick-pathview.html">PathView</a>, <a href="qml-qtquick-pincharea.html">PinchArea</a>, <a href="qml-qtquick-rectangle.html">Rectangle</a>, <a href="qml-qtquick-repeater.html">Repeater</a>, <a href="qml-qtquick-row.html">Row</a>, <a href="qml-qtquick-layouts-rowlayout.html">RowLayout</a>, <a href="qml-qtquick-shadereffect.html">ShaderEffect</a>, <a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>, <a href="qml-qtquick-shapes-shape.html">Shape</a>, <a href="qml-qtquick-spritesequence.html">SpriteSequence</a>, <a href="qml-qtquick-layouts-stacklayout.html">StackLayout</a>, <a href="qml-qtquick-text.html">Text</a>, <a href="qml-qtquick-textedit.html">TextEdit</a>, and <a href="qml-qtquick-textinput.html">TextInput</a></p>
</td></tr></table></div><ul>
<li><a href="qml-qtquick-item-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-item.html#activeFocus-prop">activeFocus</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#activeFocusOnTab-prop">activeFocusOnTab</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors-prop">anchors</a></b></b><ul>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.top-prop">anchors.top</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.bottom-prop">anchors.bottom</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.left-prop">anchors.left</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.right-prop">anchors.right</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.horizontalCenter-prop">anchors.horizontalCenter</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.verticalCenter-prop">anchors.verticalCenter</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.baseline-prop">anchors.baseline</a></b></b> : AnchorLine</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.fill-prop">anchors.fill</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.centerIn-prop">anchors.centerIn</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.margins-prop">anchors.margins</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.topMargin-prop">anchors.topMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.bottomMargin-prop">anchors.bottomMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.leftMargin-prop">anchors.leftMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.rightMargin-prop">anchors.rightMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.horizontalCenterOffset-prop">anchors.horizontalCenterOffset</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.verticalCenterOffset-prop">anchors.verticalCenterOffset</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.baselineOffset-prop">anchors.baselineOffset</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#anchors.alignWhenCentered-prop">anchors.alignWhenCentered</a></b></b> : bool</li>
</ul>
</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#antialiasing-prop">antialiasing</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#baselineOffset-prop">baselineOffset</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#children-prop">children</a></b></b> : list&lt;Item&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect-prop">childrenRect</a></b></b><ul>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect.x-prop">childrenRect.x</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect.y-prop">childrenRect.y</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect.width-prop">childrenRect.width</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childrenRect.height-prop">childrenRect.height</a></b></b> : real</li>
</ul>
</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#clip-prop">clip</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#containmentMask-prop">containmentMask</a></b></b> : QObject*</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#data-prop">data</a></b></b> : list&lt;Object&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#enabled-prop">enabled</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#focus-prop">focus</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#height-prop">height</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#implicitHeight-prop">implicitHeight</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#implicitWidth-prop">implicitWidth</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.effect-prop">layer.effect</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.enabled-prop">layer.enabled</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.format-prop">layer.format</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.mipmap-prop">layer.mipmap</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.samplerName-prop">layer.samplerName</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.samples-prop">layer.samples</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.smooth-prop">layer.smooth</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.sourceRect-prop">layer.sourceRect</a></b></b> : rect</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.textureMirroring-prop">layer.textureMirroring</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.textureSize-prop">layer.textureSize</a></b></b> : size</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#layer.wrapMode-prop">layer.wrapMode</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#opacity-prop">opacity</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#parent-prop">parent</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#resources-prop">resources</a></b></b> : list&lt;Object&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#rotation-prop">rotation</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#scale-prop">scale</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#smooth-prop">smooth</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#state-prop">state</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#states-prop">states</a></b></b> : list&lt;State&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#transform-prop">transform</a></b></b> : list&lt;Transform&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#transitions-prop">transitions</a></b></b> : list&lt;Transition&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#visible-prop">visible</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#visibleChildren-prop">visibleChildren</a></b></b> : list&lt;Item&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#width-prop">width</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#x-prop">x</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#y-prop">y</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#z-prop">z</a></b></b> : real</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-item.html#childAt-method">childAt</a></b></b>(real <i>x</i>,  real <i>y</i>)</li>
<li class="fn">bool <b><b><a href="qml-qtquick-item.html#contains-method">contains</a></b></b>(point <i>point</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#forceActiveFocus-method">forceActiveFocus</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#forceActiveFocus-method-1">forceActiveFocus</a></b></b>(Qt::FocusReason <i>reason</i>)</li>
<li class="fn">bool <b><b><a href="qml-qtquick-item.html#grabToImage-method">grabToImage</a></b></b>(<i>callback</i>, <i>targetSize</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapFromGlobal-method">mapFromGlobal</a></b></b>(real <i>x</i>,  real <i>y</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapFromItem-method">mapFromItem</a></b></b>(Item <i>item</i>,  real <i>x</i>,  real <i>y</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapFromItem-method-1">mapFromItem</a></b></b>(Item <i>item</i>,  real <i>x</i>,  real <i>y</i>,  real <i>width</i>,  real <i>height</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapToGlobal-method">mapToGlobal</a></b></b>(real <i>x</i>,  real <i>y</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapToItem-method">mapToItem</a></b></b>(Item <i>item</i>,  real <i>x</i>,  real <i>y</i>)</li>
<li class="fn">object <b><b><a href="qml-qtquick-item.html#mapToItem-method-1">mapToItem</a></b></b>(Item <i>item</i>,  real <i>x</i>,  real <i>y</i>,  real <i>width</i>,  real <i>height</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-item.html#nextItemInFocusChain-method">nextItemInFocusChain</a></b></b>(bool <i>forward</i>)</li>
</ul>
<!-- $$$Item-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>The Item type is the base type for all visual items in Qt Quick.</p>
<p>All visual items in Qt Quick inherit from Item. Although an Item object has no visual appearance, it defines all the attributes that are common across visual items, such as x and y position, width and height, <a href="qtquick-positioning-anchors.html">anchoring</a> and key handling support.</p>
<p>The Item type can be useful for grouping several items under a single root visual item. For example:</p>
<pre class="qml">



</pre>
<a name="key-handling"></a>
<h3 id="key-handling">Key Handling</h3>
<p>Key handling is available to all Item-based visual types via the <a href="qml-qtquick-keys.html">Keys</a> attached property. The <i>Keys</i> attached property provides basic signals such as <a href="qml-qtquick-keys.html#pressed-signal">pressed</a> and <a href="qml-qtquick-keys.html#released-signal">released</a>, as well as signals for specific keys, such as <a href="qml-qtquick-keys.html#spacePressed-signal">spacePressed</a>. The example below assigns <a href="qtquick-input-focus.html">keyboard focus</a> to the item and handles the left key via the general <code>onPressed</code> handler and the return key via the <code>onReturnPressed</code> handler:</p>
<pre class="qml">



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

  Item {
      id: nonLayered

      opacity: 0.5

      width: 100
      height: 100

      Rectangle { width: 80; height: 80; border.width: 1 }
      Rectangle { x: 20; y: 20; width: 80; height: 80; border.width: 1 }
  }

</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">

  Item {
      id: layered

      opacity: 0.5

      layer.enabled: true

      width: 100
      height: 100

      Rectangle { width: 80; height: 80; border.width: 1 }
      Rectangle { x: 20; y: 20; width: 80; height: 80; border.width: 1 }
  }

</pre>
</td></tr>
</table></div>
<a name="combined-with-shadereffects"></a>
<h3 id="combined-with-shadereffects">Combined with ShaderEffects</h3>
<p>Setting <a href="qml-qtquick-item.html#layer.enabled-prop">layer.enabled</a> to true will turn the item into a <a href="qquickitem.html#isTextureProvider">texture provider</a>, making it possible to use the item directly as a texture, for instance in combination with the <a href="qml-qtquick-shadereffect.html">ShaderEffect</a> type.</p>
<p>It is possible to apply an effect on a layer at runtime using layer.effect:</p>
<pre class="qml">

  Item {
      id: layerRoot
      layer.enabled: true
      layer.effect: ShaderEffect {
          fragmentShader: "
              uniform lowp sampler2D source; // this item
              uniform lowp float qt_Opacity; // inherited opacity of this item
              varying highp vec2 qt_TexCoord0;
              void main() {
                  lowp vec4 p = texture2D(source, qt_TexCoord0);
                  lowp float g = dot(p.xyz, vec3(0.344, 0.5, 0.156));
                  gl_FragColor = vec4(g, g, g, p.a) * qt_Opacity;
              }"
      }

</pre>
<p>In this example, we implement the shader effect manually. The Qt Graphical Effects module contains a suite of ready-made effects for use with Qt Quick.</p>
<p>See <a href="qml-qtquick-shadereffect.html">ShaderEffect</a> for more information about using effects.</p>
<p><b>Note: </b><a href="qml-qtquick-item.html#layer.enabled-prop">layer.enabled</a> is actually just a more convenient way of using <a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.</p><a name="memory-and-performance"></a>
<h3 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>width x height x 4</code>. In memory constrained configurations, large layers should be used with care.</p>
<p>In the QPainter / QWidget world, it is some times favorable to cache complex content in a pixmap, image or texture. In Qt Quick, because of the techniques already applied by the <a href="qtquick-visualcanvas-scenegraph-renderer.html">scene graph renderer</a>, this will in most cases not be the case. Excessive draw calls are already reduced because of batching and a cache will in most cases end up blending more pixels than the original content. The overhead of rendering to an offscreen and the blending involved with drawing the resulting texture is therefore often more costly than simply letting the item and its children be drawn normally.</p>
<p>Also, an item using a layer can not be <a href="qtquick-visualcanvas-scenegraph-renderer.html#batching">batched</a> during rendering. This means that a scene with many layered items may have performance problems.</p>
<p>Layering can be convenient and useful for visual effects, but should in most cases be enabled for the duration of the effect and disabled afterwards.</p>
<!-- @@@Item -->
<h2>Property Documentation</h2>
<!-- $$$activeFocus -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="activeFocus-prop">
<td class="tblQmlPropNode"><p>
<a name="activeFocus-prop"></a><span class="name">activeFocus</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This read-only property indicates whether the item has active focus.</p>
<p>If activeFocus is true, either this item is the one that currently receives keyboard input, or it is a <a href="qml-qtquick-focusscope.html">FocusScope</a> ancestor of the item that currently receives keyboard input.</p>
<p>Usually, activeFocus is gained by setting <a href="qml-qtquick-item.html#focus-prop">focus</a> on an item and its enclosing <a href="qml-qtquick-focusscope.html">FocusScope</a> objects. In the following example, the <code>input</code> and <code>focusScope</code> objects will have active focus, while the root rectangle object will not.</p>
<pre class="qml">



</pre>
<p><b>See also </b><a href="qml-qtquick-item.html#focus-prop">focus</a> and <a href="qtquick-input-focus.html">Keyboard Focus in Qt Quick</a>.</p>
</div></div><!-- @@@activeFocus -->
<br/>
<!-- $$$activeFocusOnTab -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="activeFocusOnTab-prop">
<td class="tblQmlPropNode"><p>
<a name="activeFocusOnTab-prop"></a><span class="name">activeFocusOnTab</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds whether the item wants to be in the tab focus chain. By default, this is set to <code>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">KeyNavigation</a>. Tab key events used by Keys or <a href="qml-qtquick-keynavigation.html">KeyNavigation</a> have precedence over focus chain behavior; ignore the events in other key handlers to allow it to propagate.</p>
</div></div><!-- @@@activeFocusOnTab -->
<br/>
<!-- $$$anchors -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="even" id="anchors-prop"><th class="centerAlign"><p><a name="anchors-prop"></a><b>anchors group</b></p></th></tr><tr valign="top" class="odd" id="anchors.top-prop"><td class="tblQmlPropNode"><p><a name="anchors.top-prop"></a><span class="name">anchors.top</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.bottom-prop"><td class="tblQmlPropNode"><p><a name="anchors.bottom-prop"></a><span class="name">anchors.bottom</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.left-prop"><td class="tblQmlPropNode"><p><a name="anchors.left-prop"></a><span class="name">anchors.left</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.right-prop"><td class="tblQmlPropNode"><p><a name="anchors.right-prop"></a><span class="name">anchors.right</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.horizontalCenter-prop"><td class="tblQmlPropNode"><p><a name="anchors.horizontalCenter-prop"></a><span class="name">anchors.horizontalCenter</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.verticalCenter-prop"><td class="tblQmlPropNode"><p><a name="anchors.verticalCenter-prop"></a><span class="name">anchors.verticalCenter</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.baseline-prop"><td class="tblQmlPropNode"><p><a name="anchors.baseline-prop"></a><span class="name">anchors.baseline</span> : <span class="type">AnchorLine</span></p></td></tr><tr valign="top" class="odd" id="anchors.fill-prop"><td class="tblQmlPropNode"><p><a name="anchors.fill-prop"></a><span class="name">anchors.fill</span> : <span class="type"><a href="qml-qtquick-item.html">Item</a></span></p></td></tr><tr valign="top" class="odd" id="anchors.centerIn-prop"><td class="tblQmlPropNode"><p><a name="anchors.centerIn-prop"></a><span class="name">anchors.centerIn</span> : <span class="type"><a href="qml-qtquick-item.html">Item</a></span></p></td></tr><tr valign="top" class="odd" id="anchors.margins-prop"><td class="tblQmlPropNode"><p><a name="anchors.margins-prop"></a><span class="name">anchors.margins</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.topMargin-prop"><td class="tblQmlPropNode"><p><a name="anchors.topMargin-prop"></a><span class="name">anchors.topMargin</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.bottomMargin-prop"><td class="tblQmlPropNode"><p><a name="anchors.bottomMargin-prop"></a><span class="name">anchors.bottomMargin</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.leftMargin-prop"><td class="tblQmlPropNode"><p><a name="anchors.leftMargin-prop"></a><span class="name">anchors.leftMargin</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.rightMargin-prop"><td class="tblQmlPropNode"><p><a name="anchors.rightMargin-prop"></a><span class="name">anchors.rightMargin</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.horizontalCenterOffset-prop"><td class="tblQmlPropNode"><p><a name="anchors.horizontalCenterOffset-prop"></a><span class="name">anchors.horizontalCenterOffset</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.verticalCenterOffset-prop"><td class="tblQmlPropNode"><p><a name="anchors.verticalCenterOffset-prop"></a><span class="name">anchors.verticalCenterOffset</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.baselineOffset-prop"><td class="tblQmlPropNode"><p><a name="anchors.baselineOffset-prop"></a><span class="name">anchors.baselineOffset</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="anchors.alignWhenCentered-prop"><td class="tblQmlPropNode"><p><a name="anchors.alignWhenCentered-prop"></a><span class="name">anchors.alignWhenCentered</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>Anchors provide a way to position an item by specifying its relationship with other items.</p>
<p>Margins apply to top, bottom, left, right, and fill anchors. The <a href="qml-qtquick-item.html#anchors.margins-prop">anchors.margins</a> property can be used to set all of the various margins at once, to the same value. It will not override a specific margin that has been previously set; to clear an explicit margin set its value to <code>undefined</code>. Note that margins are anchor-specific and are not applied if an item does not use anchors.</p>
<p>Offsets apply for horizontal center, vertical center, and baseline anchors.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-anchors_example.png" alt="" /></p></td><td >Text anchored to Image, horizontally centered and vertically below, with a margin.<pre class="qml">



</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">



</pre>
</td></tr>
</table></div>
<p><a href="qml-qtquick-item.html#anchors.fill-prop">anchors.fill</a> provides a convenient way for one item to have the same geometry as another item, and is equivalent to connecting all four directional anchors.</p>
<p>To clear an anchor value, set it to <code>undefined</code>.</p>
<p><a href="qml-qtquick-item.html#anchors.alignWhenCentered-prop">anchors.alignWhenCentered</a> (default <code>true</code>) forces centered anchors to align to a whole pixel; if the item being centered has an odd <a href="qml-qtquick-item.html#width-prop">width</a> or <a href="qml-qtquick-item.html#height-prop">height</a>, the item will be positioned on a whole pixel rather than being placed on a half-pixel. This ensures the item is painted crisply. There are cases where this is not desirable, for example when rotating the item jitters may be apparent as the center is rounded.</p>
<p><b>Note: </b>You can only anchor an item to siblings or a parent.</p><p>For more information see <a href="qtquick-positioning-anchors.html">Anchor Layouts</a>.</p>
</div></div><!-- @@@anchors -->
<br/>
<!-- $$$antialiasing -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="antialiasing-prop">
<td class="tblQmlPropNode"><p>
<a name="antialiasing-prop"></a><span class="name">antialiasing</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Used by visual elements to decide if the item should use antialiasing or not. In some cases items with antialiasing require more memory and are potentially slower to render (see <a href="qtquick-visualcanvas-scenegraph-renderer.html#antialiasing">Antialiasing</a> for more details).</p>
<p>The default is false, but may be overridden by derived elements.</p>
</div></div><!-- @@@antialiasing -->
<br/>
<!-- $$$baselineOffset -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="baselineOffset-prop">
<td class="tblQmlPropNode"><p>
<a name="baselineOffset-prop"></a><span class="name">baselineOffset</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Specifies the position of the item's baseline in local coordinates.</p>
<p>The baseline of a <a href="qml-qtquick-text.html">Text</a> item is the imaginary line on which the text sits. Controls containing text usually set their baseline to the baseline of their text.</p>
<p>For non-text items, a default baseline offset of 0 is used.</p>
</div></div><!-- @@@baselineOffset -->
<br/>
<!-- $$$children -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="children-prop">
<td class="tblQmlPropNode"><p>
<a name="children-prop"></a><span class="name">children</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qtquick-item.html">Item</a></span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The children property contains the list of visual children of this item. The resources property contains non-visual resources that you want to reference by name.</p>
<p>It is not generally necessary to refer to these properties when adding child items or resources, as the default <a href="qml-qtquick-item.html#data-prop">data</a> property will automatically assign child objects to the <code>children</code> and <code>resources</code> properties as appropriate. See the <a href="qml-qtquick-item.html#data-prop">data</a> documentation for details.</p>
</div></div><!-- @@@children -->
<br/>
<!-- $$$childrenRect -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="even" id="childrenRect-prop"><th class="centerAlign"><p><a name="childrenRect-prop"></a><b>childrenRect group</b></p></th></tr><tr valign="top" class="odd" id="childrenRect.x-prop"><td class="tblQmlPropNode"><p><a name="childrenRect.x-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">childrenRect.x</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="childrenRect.y-prop"><td class="tblQmlPropNode"><p><a name="childrenRect.y-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">childrenRect.y</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="childrenRect.width-prop"><td class="tblQmlPropNode"><p><a name="childrenRect.width-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">childrenRect.width</span> : <span class="type">real</span></p></td></tr><tr valign="top" class="odd" id="childrenRect.height-prop"><td class="tblQmlPropNode"><p><a name="childrenRect.height-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">childrenRect.height</span> : <span class="type">real</span></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>
</div></div><!-- @@@childrenRect -->
<br/>
<!-- $$$clip -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="clip-prop">
<td class="tblQmlPropNode"><p>
<a name="clip-prop"></a><span class="name">clip</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds whether clipping is enabled. The default clip value is <code>false</code>.</p>
<p>If clipping is enabled, an item will clip its own painting, as well as the painting of its children, to its bounding rectangle.</p>
</div></div><!-- @@@clip -->
<br/>
<!-- $$$containmentMask -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="containmentMask-prop">
<td class="tblQmlPropNode"><p>
<a name="containmentMask-prop"></a><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">QtQuick::Item::contains</a> method. <a href="qml-qtquick-item.html#contains-method">QtQuick::Item::contains</a> main use is currently to determine whether an input event has landed into the item or not.</p>
<p>By default the <a href="qml-qtquick-item.html#contains-method">contains</a> method will return true for any point within the Item's bounding box. <code>containmentMask</code> allows for a more fine-grained control. For example, the developer could define and use an AnotherItem element as containmentMask, which has a specialized contains method, like:</p>
<pre class="cpp">

  Item { id: item; containmentMask: AnotherItem { id: anotherItem } }

</pre>
<p><i>item</i>'s contains method would then return true only if <i>anotherItem</i>'s contains implementation returns true.</p>
<p>This property was introduced in  Qt 5.11.</p>
</div></div><!-- @@@containmentMask -->
<br/>
<!-- $$$data -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="data-prop">
<td class="tblQmlPropNode"><p>
<a name="data-prop"></a><span class="qmldefault">[default] </span><span class="name">data</span> : <span class="type">list</span>&lt;<span class="type">Object</span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The data property allows you to freely mix visual children and resources in an item. If you assign a visual item to the data list it becomes a child and if you assign any other object type, it is added as a resource.</p>
<p>So you can write:</p>
<pre class="qml">



</pre>
<p>instead of:</p>
<pre class="qml">



</pre>
<p>It should not generally be necessary to refer to the <code>data</code> property, as it is the default property for Item and thus all child items are automatically assigned to this property.</p>
</div></div><!-- @@@data -->
<br/>
<!-- $$$enabled -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="enabled-prop">
<td class="tblQmlPropNode"><p>
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds whether the item receives mouse and keyboard events. By default this is true.</p>
<p>Setting this property directly affects the <code>enabled</code> value of child items. When set to <code>false</code>, the <code>enabled</code> values of all child items also become <code>false</code>. When set to <code>true</code>, the <code>enabled</code> values of child items are returned to <code>true</code>, unless they have explicitly been set to <code>false</code>.</p>
<p>Setting this property to <code>false</code> automatically causes <a href="qml-qtquick-item.html#activeFocus-prop">activeFocus</a> to be set to <code>false</code>, and this item will no longer receive keyboard events.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#visible-prop">visible</a>.</p>
</div></div><!-- @@@enabled -->
<br/>
<!-- $$$focus -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="focus-prop">
<td class="tblQmlPropNode"><p>
<a name="focus-prop"></a><span class="name">focus</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds whether the item has focus within the enclosing <a href="qml-qtquick-focusscope.html">FocusScope</a>. If true, this item will gain active focus when the enclosing <a href="qml-qtquick-focusscope.html">FocusScope</a> gains active focus.</p>
<p>In the following example, <code>input</code> will be given active focus when <code>scope</code> gains active focus:</p>
<pre class="qml">



</pre>
<p>For the purposes of this property, the scene as a whole is assumed to act like a focus scope. On a practical level, that means the following QML will give active focus to <code>input</code> on startup.</p>
<pre class="qml">



</pre>
<p><b>See also </b><a href="qml-qtquick-item.html#activeFocus-prop">activeFocus</a> and <a href="qtquick-input-focus.html">Keyboard Focus in Qt Quick</a>.</p>
</div></div><!-- @@@focus -->
<br/>
<!-- $$$height -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="height-prop">
<td class="tblQmlPropNode"><p>
<a name="height-prop"></a><span class="name">height</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Defines the item's position and size. The default value is <code>0</code>.</p>
<p>The (x,y) position is relative to the <a href="qml-qtquick-item.html#parent-prop">parent</a>.</p>
<pre class="qml">



</pre>
</div></div><!-- @@@height -->
<br/>
<!-- $$$implicitHeight -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="implicitHeight-prop">
<td class="tblQmlPropNode"><p>
<a name="implicitHeight-prop"></a><span class="name">implicitHeight</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Defines the natural width or height of the Item if no <a href="qml-qtquick-item.html#width-prop">width</a> or <a href="qml-qtquick-item.html#height-prop">height</a> is specified.</p>
<p>The default implicit size for most items is 0x0, however some items have an inherent implicit size which cannot be overridden, for example, <a href="qml-qtquick-image.html">Image</a> and <a href="qml-qtquick-text.html">Text</a>.</p>
<p>Setting the implicit size is useful for defining components that have a preferred size based on their content, for example:</p>
<pre class="qml">



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



</pre>
<p><b>Note: </b>Using implicitWidth of <a href="qml-qtquick-text.html">Text</a> or <a href="qml-qtquick-textedit.html">TextEdit</a> and setting the width explicitly incurs a performance penalty as the text must be laid out twice.</p></div></div><!-- @@@implicitWidth -->
<br/>
<!-- $$$layer.effect -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.effect-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.effect-prop"></a><span class="name">layer.effect</span> : <span class="type">Component</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Holds the effect that is applied to this layer.</p>
<p>The effect is typically a <a href="qml-qtquick-shadereffect.html">ShaderEffect</a> component, although any <a href="qml-qtquick-item.html">Item</a> component can be assigned. The effect should have a source texture property with a name matching <a href="qml-qtquick-item.html#layer.samplerName-prop">layer.samplerName</a>.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#layer.samplerName-prop">layer.samplerName</a> and <a href="qml-qtquick-item.html#item-layers">Item Layers</a>.</p>
</div></div><!-- @@@layer.effect -->
<br/>
<!-- $$$layer.enabled -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.enabled-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.enabled-prop"></a><span class="name">layer.enabled</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Holds whether the item is layered or not. Layering is disabled by default.</p>
<p>A layered item is rendered into an offscreen surface and cached until it is changed. Enabling layering for complex QML item hierarchies can sometimes be an optimization.</p>
<p>None of the other layer properties have any effect when the layer is disabled.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers">Item Layers</a>.</p>
</div></div><!-- @@@layer.enabled -->
<br/>
<!-- $$$layer.format -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.format-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.format-prop"></a><span class="name">layer.format</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property defines the internal OpenGL format of the texture. Modifying this property makes most sense when the <i>layer.effect</i> is also specified. Depending on the OpenGL implementation, this property might allow you to save some texture memory.</p>
<ul>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.Alpha - GL_ALPHA;</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RGB - GL_RGB</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RGBA - GL_RGBA</li>
</ul>
<p><b>Note: </b><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RGB and <a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.Alpha should be used with caution, as support for these formats in the underlying hardare and driver is often not present.</p><p><b>See also </b><a href="qml-qtquick-item.html#item-layers">Item Layers</a>.</p>
</div></div><!-- @@@layer.format -->
<br/>
<!-- $$$layer.mipmap -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.mipmap-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.mipmap-prop"></a><span class="name">layer.mipmap</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>If this property is true, mipmaps are generated for the texture.</p>
<p><b>Note: </b>Some OpenGL ES 2 implementations do not support mipmapping of non-power-of-two textures.</p><p><b>See also </b><a href="qml-qtquick-item.html#item-layers">Item Layers</a>.</p>
</div></div><!-- @@@layer.mipmap -->
<br/>
<!-- $$$layer.samplerName -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.samplerName-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.samplerName-prop"></a><span class="name">layer.samplerName</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Holds the name of the effect's source texture property.</p>
<p>This value must match the name of the effect's source texture property so that the Item can pass the layer's offscreen surface to the effect correctly.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#layer.effect-prop">layer.effect</a>, <a href="qml-qtquick-shadereffect.html">ShaderEffect</a>, and <a href="qml-qtquick-item.html#item-layers">Item Layers</a>.</p>
</div></div><!-- @@@layer.samplerName -->
<br/>
<!-- $$$layer.samples -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.samples-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.samples-prop"></a><span class="name">layer.samples</span> : <span class="type">enumeration</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>
<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><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><p>This property was introduced in  Qt 5.10.</p>
</div></div><!-- @@@layer.samples -->
<br/>
<!-- $$$layer.smooth -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.smooth-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.smooth-prop"></a><span class="name">layer.smooth</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Holds whether the layer is smoothly transformed.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers">Item Layers</a>.</p>
</div></div><!-- @@@layer.smooth -->
<br/>
<!-- $$$layer.sourceRect -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.sourceRect-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.sourceRect-prop"></a><span class="name">layer.sourceRect</span> : <span class="type">rect</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property defines the rectangular area of the item that should be rendered into the texture. The source rectangle can be larger than the item itself. If the rectangle is null, which is the default, then the whole item is rendered to the texture.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#item-layers">Item Layers</a>.</p>
</div></div><!-- @@@layer.sourceRect -->
<br/>
<!-- $$$layer.textureMirroring -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.textureMirroring-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.textureMirroring-prop"></a><span class="name">layer.textureMirroring</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property defines how the generated OpenGL texture should be mirrored. The default value is <code>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">ShaderEffect</a>. If no effect is specified for the layered item, mirroring has no effect on the UI representation of the item.</p>
<ul>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.NoMirroring - No mirroring</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.MirrorHorizontally - The generated texture is flipped along X-axis.</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.MirrorVertically - The generated texture is flipped along Y-axis.</li>
</ul>
<p>This property was introduced in  Qt 5.6.</p>
</div></div><!-- @@@layer.textureMirroring -->
<br/>
<!-- $$$layer.textureSize -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.textureSize-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.textureSize-prop"></a><span class="name">layer.textureSize</span> : <span class="type">size</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the requested pixel size of the layers texture. If it is empty, which is the default, the size of the item is used.</p>
<p><b>Note: </b>Some platforms have a limit on how small framebuffer objects can be, which means the actual texture size might be larger than the requested size.</p><p><b>See also </b><a href="qml-qtquick-item.html#item-layers">Item Layers</a>.</p>
</div></div><!-- @@@layer.textureSize -->
<br/>
<!-- $$$layer.wrapMode -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="layer.wrapMode-prop">
<td class="tblQmlPropNode"><p>
<a name="layer.wrapMode-prop"></a><span class="name">layer.wrapMode</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property defines the OpenGL wrap modes associated with the texture. Modifying this property makes most sense when the <i>layer.effect</i> is specified.</p>
<ul>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.ClampToEdge - GL_CLAMP_TO_EDGE both horizontally and vertically</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RepeatHorizontally - GL_REPEAT horizontally, GL_CLAMP_TO_EDGE vertically</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.RepeatVertically - GL_CLAMP_TO_EDGE horizontally, GL_REPEAT vertically</li>
<li><a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.Repeat - GL_REPEAT both horizontally and vertically</li>
</ul>
<p><b>Note: </b>Some OpenGL ES 2 implementations do not support the GL_REPEAT wrap mode with non-power-of-two textures.</p><p><b>See also </b><a href="qml-qtquick-item.html#item-layers">Item Layers</a>.</p>
</div></div><!-- @@@layer.wrapMode -->
<br/>
<!-- $$$opacity -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="opacity-prop">
<td class="tblQmlPropNode"><p>
<a name="opacity-prop"></a><span class="name">opacity</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the opacity of the item. Opacity is specified as a number between 0.0 (fully transparent) and 1.0 (fully opaque). The default value is 1.0&#x2e;</p>
<p>When this property is set, the specified opacity is also applied individually to child items. This may have an unintended effect in some circumstances. For example in the second set of rectangles below, the red rectangle has specified an opacity of 0.5, which affects the opacity of its blue child rectangle even though the child has not specified an opacity.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-item_opacity1.png" alt="" /></p></td><td ><pre class="qml">



</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">



</pre>
</td></tr>
</table></div>
<p>Changing an item's opacity does not affect whether the item receives user input events. (In contrast, setting <a href="qml-qtquick-item.html#visible-prop">visible</a> property to <code>false</code> stops mouse events, and setting the <a href="qml-qtquick-item.html#enabled-prop">enabled</a> property to <code>false</code> stops mouse and keyboard events, and also removes active focus from the item.)</p>
<p><b>See also </b><a href="qml-qtquick-item.html#visible-prop">visible</a>.</p>
</div></div><!-- @@@opacity -->
<br/>
<!-- $$$parent -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="parent-prop">
<td class="tblQmlPropNode"><p>
<a name="parent-prop"></a><span class="name">parent</span> : <span class="type"><a href="qml-qtquick-item.html">Item</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the visual parent of the item.</p>
<p><b>Note: </b>The concept of the <i>visual parent</i> differs from that of the <i>QObject parent</i>. An item's visual parent may not necessarily be the same as its object parent. See <a href="qtquick-visualcanvas-visualparent.html">Concepts - Visual Parent in Qt Quick</a> for more details.</p></div></div><!-- @@@parent -->
<br/>
<!-- $$$resources -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="resources-prop">
<td class="tblQmlPropNode"><p>
<a name="resources-prop"></a><span class="name">resources</span> : <span class="type">list</span>&lt;<span class="type">Object</span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The children property contains the list of visual children of this item. The resources property contains non-visual resources that you want to reference by name.</p>
<p>It is not generally necessary to refer to these properties when adding child items or resources, as the default <a href="qml-qtquick-item.html#data-prop">data</a> property will automatically assign child objects to the <code>children</code> and <code>resources</code> properties as appropriate. See the <a href="qml-qtquick-item.html#data-prop">data</a> documentation for details.</p>
</div></div><!-- @@@resources -->
<br/>
<!-- $$$rotation -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="rotation-prop">
<td class="tblQmlPropNode"><p>
<a name="rotation-prop"></a><span class="name">rotation</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the rotation of the item in degrees clockwise around its <a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a>.</p>
<p>The default value is 0 degrees (that is, no rotation).</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-rotation.png" alt="" /></p></td><td ><pre class="qml">



</pre>
</td></tr>
</table></div>
<p><b>See also </b><a href="qml-qtquick-transform.html">Transform</a> and <a href="qml-qtquick-rotation.html">Rotation</a>.</p>
</div></div><!-- @@@rotation -->
<br/>
<!-- $$$scale -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="scale-prop">
<td class="tblQmlPropNode"><p>
<a name="scale-prop"></a><span class="name">scale</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the scale factor for this item.</p>
<p>A scale of less than 1.0 causes the item to be rendered at a smaller size, and a scale greater than 1.0 renders the item at a larger size. A negative scale causes the item to be mirrored when rendered.</p>
<p>The default value is 1.0&#x2e;</p>
<p>Scaling is applied from the <a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a>.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-scale.png" alt="" /></p></td><td ><pre class="qml">



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



</pre>
<p>See <a href="qtquick-statesanimations-states.html">Qt Quick States</a> and <a href="qtquick-statesanimations-animations.html">Animation and Transitions in Qt Quick</a> for more details on using states and transitions.</p>
<p><b>See also </b><a href="qtquick-statesanimations-topic.html#transitions">transitions</a>.</p>
</div></div><!-- @@@states -->
<br/>
<!-- $$$transform -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="transform-prop">
<td class="tblQmlPropNode"><p>
<a name="transform-prop"></a><span class="name">transform</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qtquick-transform.html">Transform</a></span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the list of transformations to apply.</p>
<p>For more information see <a href="qml-qtquick-transform.html">Transform</a>.</p>
</div></div><!-- @@@transform -->
<br/>
<!-- $$$transformOrigin -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="transformOrigin-prop">
<td class="tblQmlPropNode"><p>
<a name="transformOrigin-prop"></a><span class="name">transformOrigin</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the origin point around which scale and rotation transform.</p>
<p>Nine transform origins are available, as shown in the image below. The default transform origin is <code>Item.Center</code>.</p>
<p class="centerAlign"><img src="images/declarative-transformorigin.png" alt="" /></p><p>This example rotates an image around its bottom-right corner.</p>
<pre class="qml">



</pre>
<p>To set an arbitrary transform origin point use the <a href="qml-qtquick-scale.html">Scale</a> or <a href="qml-qtquick-rotation.html">Rotation</a> transform types with <a href="qml-qtquick-item.html#transform-prop">transform</a>.</p>
</div></div><!-- @@@transformOrigin -->
<br/>
<!-- $$$transitions -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="transitions-prop">
<td class="tblQmlPropNode"><p>
<a name="transitions-prop"></a><span class="name">transitions</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qtquick-transition.html">Transition</a></span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the list of transitions for this item. These define the transitions to be applied to the item whenever it changes its <a href="qml-qtquick-item.html#state-prop">state</a>.</p>
<p>This property is specified as a list of <a href="qmlexampletoggleswitch.html#transition">Transition</a> objects. For example:</p>
<pre class="qml">



</pre>
<p>See <a href="qtquick-statesanimations-states.html">Qt Quick States</a> and <a href="qtquick-statesanimations-animations.html">Animation and Transitions in Qt Quick</a> for more details on using states and transitions.</p>
<p><b>See also </b><a href="qtquick-statesanimations-topic.html#states">states</a>.</p>
</div></div><!-- @@@transitions -->
<br/>
<!-- $$$visible -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="visible-prop">
<td class="tblQmlPropNode"><p>
<a name="visible-prop"></a><span class="name">visible</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds whether the item is visible. By default this is true.</p>
<p>Setting this property directly affects the <code>visible</code> value of child items. When set to <code>false</code>, the <code>visible</code> values of all child items also become <code>false</code>. When set to <code>true</code>, the <code>visible</code> values of child items are returned to <code>true</code>, unless they have explicitly been set to <code>false</code>.</p>
<p>(Because of this flow-on behavior, using the <code>visible</code> property may not have the intended effect if a property binding should only respond to explicit property changes. In such cases it may be better to use the <a href="qtquick-effects-topic.html#opacity">opacity</a> property instead.)</p>
<p>If this property is set to <code>false</code>, the item will no longer receive mouse events, but will continue to receive key events and will retain the keyboard <a href="qml-qtquick-item.html#focus-prop">focus</a> if it has been set. (In contrast, setting the <a href="qml-qtquick-item.html#enabled-prop">enabled</a> property to <code>false</code> stops both mouse and keyboard events, and also removes focus from the item.)</p>
<p><b>Note: </b>This property's value is only affected by changes to this property or the parent's <code>visible</code> property. It does not change, for example, if this item moves off-screen, or if the <a href="qtquick-effects-topic.html#opacity">opacity</a> changes to 0.</p><p><b>See also </b><a href="qtquick-effects-topic.html#opacity">opacity</a> and <a href="qml-qtquick-item.html#enabled-prop">enabled</a>.</p>
</div></div><!-- @@@visible -->
<br/>
<!-- $$$visibleChildren -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="visibleChildren-prop">
<td class="tblQmlPropNode"><p>
<a name="visibleChildren-prop"></a><span class="name">visibleChildren</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qtquick-item.html">Item</a></span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This read-only property lists all of the item's children that are currently visible. Note that a child's visibility may have changed explicitly, or because the visibility of this (it's parent) item or another grandparent changed.</p>
</div></div><!-- @@@visibleChildren -->
<br/>
<!-- $$$width -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="width-prop">
<td class="tblQmlPropNode"><p>
<a name="width-prop"></a><span class="name">width</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Defines the item's position and size. The default value is <code>0</code>.</p>
<p>The (x,y) position is relative to the <a href="qml-qtquick-item.html#parent-prop">parent</a>.</p>
<pre class="qml">



</pre>
</div></div><!-- @@@width -->
<br/>
<!-- $$$x -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="x-prop">
<td class="tblQmlPropNode"><p>
<a name="x-prop"></a><span class="name">x</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Defines the item's position and size. The default value is <code>0</code>.</p>
<p>The (x,y) position is relative to the <a href="qml-qtquick-item.html#parent-prop">parent</a>.</p>
<pre class="qml">



</pre>
</div></div><!-- @@@x -->
<br/>
<!-- $$$y -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="y-prop">
<td class="tblQmlPropNode"><p>
<a name="y-prop"></a><span class="name">y</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Defines the item's position and size. The default value is <code>0</code>.</p>
<p>The (x,y) position is relative to the <a href="qml-qtquick-item.html#parent-prop">parent</a>.</p>
<pre class="qml">



</pre>
</div></div><!-- @@@y -->
<br/>
<!-- $$$z -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="z-prop">
<td class="tblQmlPropNode"><p>
<a name="z-prop"></a><span class="name">z</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Sets the stacking order of sibling items. By default the stacking order is 0.</p>
<p>Items with a higher stacking value are drawn on top of siblings with a lower stacking order. Items with the same stacking value are drawn bottom up in the order they appear. Items with a negative stacking value are drawn under their parent's content.</p>
<p>The following example shows the various effects of stacking order.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-item_stacking1.png" alt="" /></p></td><td >Same <code>z</code> - later children above earlier children:<pre class="qml">



</pre>
</td></tr>
<tr valign="top" class="even"><td ><p class="centerAlign"><img src="images/declarative-item_stacking2.png" alt="" /></p></td><td >Higher <code>z</code> on top:<pre class="qml">



</pre>
</td></tr>
<tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-item_stacking3.png" alt="" /></p></td><td >Same <code>z</code> - children above parents:<pre class="qml">



</pre>
</td></tr>
<tr valign="top" class="even"><td ><p class="centerAlign"><img src="images/declarative-item_stacking4.png" alt="" /></p></td><td >Lower <code>z</code> below:<pre class="qml">



</pre>
</td></tr>
</table></div>
</div></div><!-- @@@z -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$ -->
<div class="qmlitem"><div class="fngroup">
<div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="">
<td class="tblQmlFuncNode"><p>
<a name="mapToItem-method"></a><span class="type">object</span> <span class="name">mapToItem</span>(<span class="type"><a href="qml-qtquick-item.html">Item</a></span> <i>item</i>,  <span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>)</p></td></tr>
<tr valign="top" class="odd" id="">
<td class="tblQmlFuncNode"><p>
<a name="mapToItem-method-1"></a><span class="type">object</span> <span class="name">mapToItem</span>(<span class="type"><a href="qml-qtquick-item.html">Item</a></span> <i>item</i>,  <span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>,  <span class="type">real</span> <i>width</i>,  <span class="type">real</span> <i>height</i>)</p></td></tr>
</table></div>
</div></div><div class="qmldoc"><p>Maps the point (<i>x</i>, <i>y</i>) or rect (<i>x</i>, <i>y</i>, <i>width</i>, <i>height</i>), which is in this item's coordinate system, to <i>item</i>'s coordinate system, and returns a point or rect matching the mapped coordinate.</p>
<p>The following properties of the item are used in the mapping: <a href="qml-qtquick-item.html#x-prop">x</a>, <a href="qml-qtquick-item.html#y-prop">y</a>, <a href="qml-qtquick-item.html#scale-prop">scale</a>, <a href="qml-qtquick-item.html#rotation-prop">rotation</a>, <a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a>, and <a href="qml-qtquick-item.html#transform-prop">transform</a>.</p>
<p>If <i>item</i> is a <code>null</code> value, this maps the point or rect to the coordinate system of the root QML view.</p>
</div></div><!-- @@@ -->
<br/>
<!-- $$$ -->
<div class="qmlitem"><div class="fngroup">
<div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="">
<td class="tblQmlFuncNode"><p>
<a name="mapFromItem-method"></a><span class="type">object</span> <span class="name">mapFromItem</span>(<span class="type"><a href="qml-qtquick-item.html">Item</a></span> <i>item</i>,  <span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>)</p></td></tr>
<tr valign="top" class="odd" id="">
<td class="tblQmlFuncNode"><p>
<a name="mapFromItem-method-1"></a><span class="type">object</span> <span class="name">mapFromItem</span>(<span class="type"><a href="qml-qtquick-item.html">Item</a></span> <i>item</i>,  <span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>,  <span class="type">real</span> <i>width</i>,  <span class="type">real</span> <i>height</i>)</p></td></tr>
</table></div>
</div></div><div class="qmldoc"><p>Maps the point (<i>x</i>, <i>y</i>) or rect (<i>x</i>, <i>y</i>, <i>width</i>, <i>height</i>), which is in <i>item</i>'s coordinate system, to this item's coordinate system, and returns a point or rect 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">x</a>, <a href="qml-qtquick-item.html#y-prop">y</a>, <a href="qml-qtquick-item.html#scale-prop">scale</a>, <a href="qml-qtquick-item.html#rotation-prop">rotation</a>, <a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a>, and <a href="qml-qtquick-item.html#transform-prop">transform</a>.</p>
<p>If <i>item</i> is a <code>null</code> value, this maps the point or rect from the coordinate system of the root QML view.</p>
</div></div><!-- @@@ -->
<br/>
<!-- $$$childAt -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="childAt-method">
<td class="tblQmlFuncNode"><p>
<a name="childAt-method"></a><span class="name">childAt</span>(<span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Returns the first visible child item found at point (<i>x</i>, <i>y</i>) within the coordinate system of this item.</p>
<p>Returns <code>null</code> if there is no such item.</p>
</div></div><!-- @@@childAt -->
<br/>
<!-- $$$contains -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="contains-method">
<td class="tblQmlFuncNode"><p>
<a name="contains-method"></a><span class="type">bool</span> <span class="name">contains</span>(<span class="type">point</span> <i>point</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Returns true if this item contains <i>point</i>, which is in local coordinates; returns false otherwise.</p>
</div></div><!-- @@@contains -->
<br/>
<!-- $$$forceActiveFocus -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="forceActiveFocus-method">
<td class="tblQmlFuncNode"><p>
<a name="forceActiveFocus-method"></a><span class="name">forceActiveFocus</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Forces active focus on the item.</p>
<p>This method sets focus on the item and ensures that all ancestor <a href="qml-qtquick-focusscope.html">FocusScope</a> objects in the object hierarchy are also given <a href="qml-qtquick-item.html#focus-prop">focus</a>.</p>
<p>The reason for the focus change will be Qt::OtherFocusReason. Use the overloaded method to specify the focus reason to enable better handling of the focus change.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#activeFocus-prop">activeFocus</a>.</p>
</div></div><!-- @@@forceActiveFocus -->
<br/>
<!-- $$$forceActiveFocus -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="forceActiveFocus-method-1">
<td class="tblQmlFuncNode"><p>
<a name="forceActiveFocus-method-1"></a><span class="name">forceActiveFocus</span>(<span class="type">Qt::FocusReason</span> <i>reason</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This is an overloaded function.</p>
<p>Forces active focus on the item with the given <i>reason</i>.</p>
<p>This method sets focus on the item and ensures that all ancestor <a href="qml-qtquick-focusscope.html">FocusScope</a> objects in the object hierarchy are also given <a href="qml-qtquick-item.html#focus-prop">focus</a>.</p>
<p>This method was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qml-qtquick-item.html#activeFocus-prop">activeFocus</a> and Qt::FocusReason.</p>
</div></div><!-- @@@forceActiveFocus -->
<br/>
<!-- $$$grabToImage -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="grabToImage-method">
<td class="tblQmlFuncNode"><p>
<a name="grabToImage-method"></a><span class="type">bool</span> <span class="name">grabToImage</span>(<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>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">ItemGrabResult</a> object.</p>
<p>Use <i>targetSize</i> to specify the size of the target image. By default, the result will have the same size as the item.</p>
<p>If the grab could not be initiated, the function returns <code>false</code>.</p>
<p>The following snippet shows how to grab an item and store the results to a file.</p>
<pre class="qml">

  Rectangle {
      id: source
      width: 100
      height: 100
      gradient: Gradient {
          GradientStop { position: 0; color: "steelblue" }
          GradientStop { position: 1; color: "black" }
      }
  }
      // ...
      source.grabToImage(function(result) {
                             result.saveToFile("something.png");
                         });

</pre>
<p>The following snippet shows how to grab an item and use the results in another image element.</p>
<pre class="qml">

  Image {
      id: image
  }
      // ...
      source.grabToImage(function(result) {
                             image.source = result.url;
                         },
                         Qt.size(50, 50));

</pre>
<p><b>Note: </b>This function will render the item to an offscreen surface and copy that surface from the GPU's memory into the CPU's memory, which can be quite costly. For &quot;live&quot; preview, use <a href="qml-qtquick-item.html#layer.enabled-prop">layers</a> or <a href="qml-qtquick-shadereffectsource.html">ShaderEffectSource</a>.</p></div></div><!-- @@@grabToImage -->
<br/>
<!-- $$$mapFromGlobal -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapFromGlobal-method">
<td class="tblQmlFuncNode"><p>
<a name="mapFromGlobal-method"></a><span class="type">object</span> <span class="name">mapFromGlobal</span>(<span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Maps the point (<i>x</i>, <i>y</i>), which is in the global coordinate system, to the item's coordinate system, and returns a point 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">x</a>, <a href="qml-qtquick-item.html#y-prop">y</a>, <a href="qml-qtquick-item.html#scale-prop">scale</a>, <a href="qml-qtquick-item.html#rotation-prop">rotation</a>, <a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a>, and <a href="qml-qtquick-item.html#transform-prop">transform</a>.</p>
<p>This method was introduced in  Qt 5.7.</p>
</div></div><!-- @@@mapFromGlobal -->
<br/>
<!-- $$$mapToGlobal -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapToGlobal-method">
<td class="tblQmlFuncNode"><p>
<a name="mapToGlobal-method"></a><span class="type">object</span> <span class="name">mapToGlobal</span>(<span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Maps the point (<i>x</i>, <i>y</i>), which is in this item's coordinate system, to the global coordinate system, and returns a point 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">x</a>, <a href="qml-qtquick-item.html#y-prop">y</a>, <a href="qml-qtquick-item.html#scale-prop">scale</a>, <a href="qml-qtquick-item.html#rotation-prop">rotation</a>, <a href="qml-qtquick-item.html#transformOrigin-prop">transformOrigin</a>, and <a href="qml-qtquick-item.html#transform-prop">transform</a>.</p>
<p>This method was introduced in  Qt 5.7.</p>
</div></div><!-- @@@mapToGlobal -->
<br/>
<!-- $$$nextItemInFocusChain -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="nextItemInFocusChain-method">
<td class="tblQmlFuncNode"><p>
<a name="nextItemInFocusChain-method"></a><span class="name">nextItemInFocusChain</span>(<span class="type">bool</span> <i>forward</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Returns the item in the focus chain which is next to this item. If <i>forward</i> is <code>true</code>, or not supplied, it is the next item in the forwards direction. If <i>forward</i> is <code>false</code>, it is the next item in the backwards direction.</p>
<p>This method was introduced in  Qt 5.1.</p>
</div></div><!-- @@@nextItemInFocusChain -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>