Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 2cba8df17162abb32fcb8e6852f3eacc > files > 1028

qtdeclarative5-doc-5.9.4-1.mga6.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>QQuickItem Class | Qt Quick 5.9</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.9</td><td ><a href="qtquick-index.html">Qt Quick</a></td><td ><a href="qtquick-module.html">C++ Classes</a></td><td >QQuickItem</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</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="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#custom-scene-graph-items">Custom Scene Graph Items</a></li>
<li class="level2"><a href="#custom-qpainter-items">Custom QPainter Items</a></li>
<li class="level2"><a href="#behavior-animations">Behavior Animations</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QQuickItem Class</h1>
<!-- $$$QQuickItem-brief -->
<p>The <a href="qquickitem.html">QQuickItem</a> class provides the most basic of all visual items in <a href="qtquick-index.html">Qt Quick</a>. <a href="#details">More...</a></p>
<!-- @@@QQuickItem -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QQuickItem&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += quick</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiated By:</td><td class="memItemRight bottomAlign"> <a href="qml-qtquick-item.html">Item</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qquickframebufferobject.html">QQuickFramebufferObject</a> and <a href="qquickpainteditem.html">QQuickPaintedItem</a></p>
</td></tr></table></div><ul>
<li><a href="qquickitem-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qquickitem-itemchangedata.html">ItemChangeData</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qquickitem-updatepaintnodedata.html">UpdatePaintNodeData</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#Flag-enum">Flag</a></b> { ItemClipsChildrenToShape, ItemAcceptsInputMethod, ItemIsFocusScope, ItemHasContents, ItemAcceptsDrops }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#Flag-enum">Flags</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#ItemChange-enum">ItemChange</a></b> { ItemChildAddedChange, ItemChildRemovedChange, ItemSceneChange, ItemVisibleHasChanged, ..., ItemAntialiasingHasChanged }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#TransformOrigin-enum">TransformOrigin</a></b> { TopLeft, Top, TopRight, Left, ..., BottomRight }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qquickitem.html#activeFocus-prop">activeFocus</a></b> : const bool</li>
<li class="fn"><b><a href="qquickitem.html#activeFocusOnTab-prop">activeFocusOnTab</a></b> : bool</li>
<li class="fn"><b><a href="qquickitem.html#antialiasing-prop">antialiasing</a></b> : bool</li>
<li class="fn"><b><a href="qquickitem.html#baselineOffset-prop">baselineOffset</a></b> : qreal</li>
<li class="fn"><b><a href="qquickitem.html#childrenRect-prop">childrenRect</a></b> : const QRectF</li>
<li class="fn"><b><a href="qquickitem.html#clip-prop">clip</a></b> : bool</li>
<li class="fn"><b><a href="qquickitem.html#enabled-prop">enabled</a></b> : bool</li>
<li class="fn"><b><a href="qquickitem.html#focus-prop">focus</a></b> : bool</li>
<li class="fn"><b><a href="qquickitem.html#height-prop">height</a></b> : qreal</li>
<li class="fn"><b><a href="qquickitem.html#implicitHeight-prop">implicitHeight</a></b> : qreal</li>
<li class="fn"><b><a href="qquickitem.html#implicitWidth-prop">implicitWidth</a></b> : qreal</li>
<li class="fn"><b><a href="qquickitem.html#opacity-prop">opacity</a></b> : qreal</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qquickitem.html#parent-prop">parent</a></b> : QQuickItem *</li>
<li class="fn"><b><a href="qquickitem.html#rotation-prop">rotation</a></b> : qreal</li>
<li class="fn"><b><a href="qquickitem.html#scale-prop">scale</a></b> : qreal</li>
<li class="fn"><b><a href="qquickitem.html#smooth-prop">smooth</a></b> : bool</li>
<li class="fn"><b><a href="qquickitem.html#state-prop">state</a></b> : QString</li>
<li class="fn"><b><a href="qquickitem.html#transformOrigin-prop">transformOrigin</a></b> : TransformOrigin</li>
<li class="fn"><b><a href="qquickitem.html#visible-prop">visible</a></b> : bool</li>
<li class="fn"><b><a href="qquickitem.html#width-prop">width</a></b> : qreal</li>
<li class="fn"><b><a href="qquickitem.html#x-prop">x</a></b> : qreal</li>
<li class="fn"><b><a href="qquickitem.html#y-prop">y</a></b> : qreal</li>
<li class="fn"><b><a href="qquickitem.html#z-prop">z</a></b> : qreal</li>
</ul>
</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#QQuickItem">QQuickItem</a></b>(QQuickItem *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#dtor.QQuickItem">~QQuickItem</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#acceptHoverEvents">acceptHoverEvents</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::MouseButtons </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#acceptedMouseButtons">acceptedMouseButtons</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#activeFocusOnTab-prop">activeFocusOnTab</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#antialiasing-prop">antialiasing</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#baselineOffset-prop">baselineOffset</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQuickItem *</td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#childAt">childAt</a></b>(qreal <i>x</i>, qreal <i>y</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QQuickItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#childItems">childItems</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#childrenRect-prop">childrenRect</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#clip-prop">clip</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#contains">contains</a></b>(const QPointF &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCursor </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#cursor">cursor</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#filtersChildMouseEvents">filtersChildMouseEvents</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Flags </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#flags">flags</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#forceActiveFocus">forceActiveFocus</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#forceActiveFocus-1">forceActiveFocus</a></b>(Qt::FocusReason <i>reason</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#grabMouse">grabMouse</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSharedPointer&lt;QQuickItemGrabResult&gt; </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#grabToImage">grabToImage</a></b>(const QSize &amp;<i>targetSize</i> = QSize())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#grabTouchPoints">grabTouchPoints</a></b>(const QVector&lt;int&gt; &amp;<i>ids</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#activeFocus-prop">hasActiveFocus</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#focus-prop">hasFocus</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#height-prop">height</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#implicitHeight-prop">implicitHeight</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#implicitWidth">implicitWidth</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#inputMethodQuery">inputMethodQuery</a></b>(Qt::InputMethodQuery <i>query</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#isAncestorOf">isAncestorOf</a></b>(const QQuickItem *<i>child</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#enabled-prop">isEnabled</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#isFocusScope">isFocusScope</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#isTextureProvider">isTextureProvider</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#visible-prop">isVisible</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#keepMouseGrab">keepMouseGrab</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#keepTouchGrab">keepTouchGrab</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapFromGlobal">mapFromGlobal</a></b>(const QPointF &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapFromItem">mapFromItem</a></b>(const QQuickItem *<i>item</i>, const QPointF &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapFromScene">mapFromScene</a></b>(const QPointF &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapRectFromItem">mapRectFromItem</a></b>(const QQuickItem *<i>item</i>, const QRectF &amp;<i>rect</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapRectFromScene">mapRectFromScene</a></b>(const QRectF &amp;<i>rect</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapRectToItem">mapRectToItem</a></b>(const QQuickItem *<i>item</i>, const QRectF &amp;<i>rect</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapRectToScene">mapRectToScene</a></b>(const QRectF &amp;<i>rect</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapToGlobal">mapToGlobal</a></b>(const QPointF &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapToItem">mapToItem</a></b>(const QQuickItem *<i>item</i>, const QPointF &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mapToScene">mapToScene</a></b>(const QPointF &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQuickItem *</td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#nextItemInFocusChain">nextItemInFocusChain</a></b>(bool <i>forward</i> = true)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#opacity-prop">opacity</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQuickItem *</td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#parent-prop">parentItem</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#polish">polish</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#antialiasing-prop">resetAntialiasing</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#height-prop">resetHeight</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#width-prop">resetWidth</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#rotation-prop">rotation</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#scale-prop">scale</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQuickItem *</td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#scopedFocusItem">scopedFocusItem</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#setAcceptHoverEvents">setAcceptHoverEvents</a></b>(bool <i>enabled</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#setAcceptedMouseButtons">setAcceptedMouseButtons</a></b>(Qt::MouseButtons <i>buttons</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#activeFocusOnTab-prop">setActiveFocusOnTab</a></b>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#antialiasing-prop">setAntialiasing</a></b>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#baselineOffset-prop">setBaselineOffset</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#clip-prop">setClip</a></b>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#setCursor">setCursor</a></b>(const QCursor &amp;<i>cursor</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#enabled-prop">setEnabled</a></b>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#setFiltersChildMouseEvents">setFiltersChildMouseEvents</a></b>(bool <i>filter</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#setFlag">setFlag</a></b>(Flag <i>flag</i>, bool <i>enabled</i> = true)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#setFlags">setFlags</a></b>(Flags <i>flags</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#focus-prop">setFocus</a></b>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#focus-prop">setFocus</a></b>(bool <i>focus</i>, Qt::FocusReason <i>reason</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#height-prop">setHeight</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#implicitHeight-prop">setImplicitHeight</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#implicitWidth-prop">setImplicitWidth</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#setKeepMouseGrab">setKeepMouseGrab</a></b>(bool <i>keep</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#setKeepTouchGrab">setKeepTouchGrab</a></b>(bool <i>keep</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#opacity-prop">setOpacity</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#parent-prop">setParentItem</a></b>(QQuickItem *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#rotation-prop">setRotation</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#scale-prop">setScale</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#smooth-prop">setSmooth</a></b>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#state-prop">setState</a></b>(<i>const QString &amp;</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#transformOrigin-prop">setTransformOrigin</a></b>(<i>TransformOrigin</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#visible-prop">setVisible</a></b>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#width-prop">setWidth</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#x-prop">setX</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#y-prop">setY</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#z-prop">setZ</a></b>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#smooth-prop">smooth</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#stackAfter">stackAfter</a></b>(const QQuickItem *<i>sibling</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#stackBefore">stackBefore</a></b>(const QQuickItem *<i>sibling</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#state-prop">state</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSGTextureProvider *</td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#textureProvider">textureProvider</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> TransformOrigin </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#transformOrigin-prop">transformOrigin</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#ungrabMouse">ungrabMouse</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#ungrabTouchPoints">ungrabTouchPoints</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#unsetCursor">unsetCursor</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#width-prop">width</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQuickWindow *</td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#window">window</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#x-prop">x</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#y-prop">y</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#z-prop">z</a></b>() const</td></tr>
</table></div>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#update">update</a></b>()</td></tr>
</table></div>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#windowChanged">windowChanged</a></b>(QQuickWindow *<i>window</i>)</td></tr>
</table></div>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#childMouseEventFilter">childMouseEventFilter</a></b>(QQuickItem *<i>item</i>, QEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#classBegin">classBegin</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#componentComplete">componentComplete</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#dragEnterEvent">dragEnterEvent</a></b>(QDragEnterEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#dragLeaveEvent">dragLeaveEvent</a></b>(QDragLeaveEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#dragMoveEvent">dragMoveEvent</a></b>(QDragMoveEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#dropEvent">dropEvent</a></b>(QDropEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#event">event</a></b>(QEvent *<i>ev</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#focusInEvent">focusInEvent</a></b>(QFocusEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#focusOutEvent">focusOutEvent</a></b>(QFocusEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#geometryChanged">geometryChanged</a></b>(const QRectF &amp;<i>newGeometry</i>, const QRectF &amp;<i>oldGeometry</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#heightValid">heightValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#hoverEnterEvent">hoverEnterEvent</a></b>(QHoverEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#hoverLeaveEvent">hoverLeaveEvent</a></b>(QHoverEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#hoverMoveEvent">hoverMoveEvent</a></b>(QHoverEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#inputMethodEvent">inputMethodEvent</a></b>(QInputMethodEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#isComponentComplete">isComponentComplete</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#itemChange">itemChange</a></b>(ItemChange <i>change</i>, const ItemChangeData &amp;<i>value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#keyPressEvent">keyPressEvent</a></b>(QKeyEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#keyReleaseEvent">keyReleaseEvent</a></b>(QKeyEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b>(QMouseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mouseMoveEvent">mouseMoveEvent</a></b>(QMouseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mousePressEvent">mousePressEvent</a></b>(QMouseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mouseReleaseEvent">mouseReleaseEvent</a></b>(QMouseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#mouseUngrabEvent">mouseUngrabEvent</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#releaseResources">releaseResources</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#touchEvent">touchEvent</a></b>(QTouchEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#touchUngrabEvent">touchUngrabEvent</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#updateInputMethod">updateInputMethod</a></b>(Qt::InputMethodQueries <i>queries</i> = Qt::ImQueryInput)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSGNode *</td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#updatePaintNode">updatePaintNode</a></b>(QSGNode *<i>oldNode</i>, UpdatePaintNodeData *<i>updatePaintNodeData</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#updatePolish">updatePolish</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#wheelEvent">wheelEvent</a></b>(QWheelEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickitem.html#widthValid">widthValid</a></b>() const</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QQuickItem-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qquickitem.html">QQuickItem</a> class provides the most basic of all visual items in <a href="qtquick-index.html">Qt Quick</a>.</p>
<p>All visual items in Qt Quick inherit from <a href="qquickitem.html">QQuickItem</a>. Although a <a href="qquickitem.html">QQuickItem</a> instance 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>You can subclass <a href="qquickitem.html">QQuickItem</a> to provide your own custom visual item that inherits these features.</p>
<a name="custom-scene-graph-items"></a>
<h3 >Custom Scene Graph Items</h3>
<p>All visual QML items are rendered using the scene graph, a low-level, high-performance rendering stack, closely tied to OpenGL. It is possible for subclasses of <a href="qquickitem.html">QQuickItem</a> to add their own custom content into the scene graph by setting the <a href="qquickitem.html#Flag-enum">QQuickItem::ItemHasContents</a> flag and reimplementing the <a href="qquickitem.html#updatePaintNode">QQuickItem::updatePaintNode</a>() function.</p>
<p><b>Warning:</b> It is crucial that OpenGL operations and interaction with the scene graph happens exclusively on the rendering thread, primarily during the <a href="qquickitem.html#updatePaintNode">updatePaintNode</a>() call. The best rule of thumb is to only use classes with the &quot;QSG&quot; prefix inside the <a href="qquickitem.html#updatePaintNode">QQuickItem::updatePaintNode</a>() function.</p>
<p><b>Note: </b>All classes with QSG prefix should be used solely on the scene graph's rendering thread. See <a href="qtquick-visualcanvas-scenegraph.html#scene-graph-and-rendering">Scene Graph and Rendering</a> for more information.</p><a name="graphics-resource-handling"></a>
<h4 >Graphics Resource Handling</h4>
<p>The preferred way to handle cleanup of graphics resources used in the scene graph, is to rely on the automatic cleanup of nodes. A <a href="qsgnode.html">QSGNode</a> returned from <a href="qquickitem.html#updatePaintNode">QQuickItem::updatePaintNode</a>() is automatically deleted on the right thread at the right time. Trees of <a href="qsgnode.html">QSGNode</a> instances are managed through the use of <a href="qsgnode.html#Flag-enum">QSGNode::OwnedByParent</a>, which is set by default. So, for the majority of custom scene graph items, no extra work will be required.</p>
<p>Implementations that store graphics resources outside the node tree, such as an item implementing <a href="qquickitem.html#textureProvider">QQuickItem::textureProvider</a>(), will need to take care in cleaning it up correctly depending on how the item is used in QML. The situations to handle are:</p>
<ul>
<li>The scene graph is invalidated; This can happen, for instance, if the window is hidden using QQuickWindow::hide(). If the item class implements a <code>slot</code> named <code>invalidateSceneGraph()</code>, this slot will be called on the rendering thread while the GUI thread is blocked. This is equivalent to connecting to <a href="qquickwindow.html#sceneGraphInvalidated">QQuickWindow::sceneGraphInvalidated</a>(). The OpenGL context of this item's window will be bound when this slot is called. The only exception is if the native OpenGL has been destroyed outside Qt's control, for instance through <code>EGL_CONTEXT_LOST</code>.</li>
<li>The item is removed from the scene; If an item is taken out of the scene, for instance because it's parent was set to <code>null</code> or an item in another window, the <a href="qquickitem.html#releaseResources">QQuickItem::releaseResources</a>() will be called on the GUI thread. <a href="qquickwindow.html#scheduleRenderJob">QQuickWindow::scheduleRenderJob</a>() should be used to schedule cleanup of rendering resources.</li>
<li>The item is deleted; When the destructor if an item runs, it should delete any graphics resources it has. If neither of the two conditions above were already met, the item will be part of a window and it is possible to use <a href="qquickwindow.html#scheduleRenderJob">QQuickWindow::scheduleRenderJob</a>() to have them cleaned up. If an implementation ignores the call to <a href="qquickitem.html#releaseResources">QQuickItem::releaseResources</a>(), the item will in many cases no longer have access to a <a href="qquickwindow.html">QQuickWindow</a> and thus no means of scheduling cleanup.</li>
</ul>
<p>When scheduling cleanup of graphics resources using <a href="qquickwindow.html#scheduleRenderJob">QQuickWindow::scheduleRenderJob</a>(), one should use either <a href="qquickwindow.html#RenderStage-enum">QQuickWindow::BeforeSynchronizingStage</a> or <a href="qquickwindow.html#RenderStage-enum">QQuickWindow::AfterSynchronizingStage</a>. The <a href="qtquick-visualcanvas-scenegraph.html#scene-graph-and-rendering">synchronization stage</a> is where the scene graph is changed as a result of changes to the QML tree. If cleanup is scheduled at any other time, it may result in other parts of the scene graph referencing the newly deleted objects as these parts have not been updated.</p>
<p><b>Note: </b>Use of QObject::deleteLater() to clean up graphics resources is not recommended as this will run at an arbitrary time and it is unknown if there will be an OpenGL context bound when the deletion takes place.</p><a name="custom-qpainter-items"></a>
<h3 >Custom QPainter Items</h3>
<p>The <a href="qquickitem.html">QQuickItem</a> provides a subclass, <a href="qquickpainteditem.html">QQuickPaintedItem</a>, which allows the users to render content using QPainter.</p>
<p><b>Warning:</b> Using <a href="qquickpainteditem.html">QQuickPaintedItem</a> uses an indirect 2D surface to render its content, either using software rasterization or using an OpenGL framebuffer object (FBO), so the rendering is a two-step operation. First rasterize the surface, then draw the surface. Using scene graph API directly is always significantly faster.</p>
<a name="behavior-animations"></a>
<h3 >Behavior Animations</h3>
<p>If your Item uses the <a href="qml-qtquick-behavior.html">Behavior</a> type to define animations for property changes, you should always use either QObject::setProperty(), QQmlProperty(), or QMetaProperty::write() when you need to modify those properties from C++. This ensures that the QML engine knows about the property change. Otherwise, the engine won't be able to carry out your requested animation. Note that these functions incur a slight performance penalty. For more details, see Accessing Members of a QML Object Type from C++.</p>
</div>
<p><b>See also </b><a href="qquickwindow.html">QQuickWindow</a> and <a href="qquickpainteditem.html">QQuickPaintedItem</a>.</p>
<!-- @@@QQuickItem -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Flag$$$ItemClipsChildrenToShape$$$ItemAcceptsInputMethod$$$ItemIsFocusScope$$$ItemHasContents$$$ItemAcceptsDrops -->
<h3 class="flags" id="Flag-enum"><a name="Flag-enum"></a>enum QQuickItem::<span class="name">Flag</span><br/>flags QQuickItem::<span class="name">Flags</span></h3>
<p>This enum type is used to specify various item properties.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemClipsChildrenToShape</code></td><td class="topAlign tblval"><code>0x01</code></td><td class="topAlign">Indicates this item should visually clip its children so that they are rendered only within the boundaries of this item.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemAcceptsInputMethod</code></td><td class="topAlign tblval"><code>0x02</code></td><td class="topAlign">Indicates the item supports text input methods.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemIsFocusScope</code></td><td class="topAlign tblval"><code>0x04</code></td><td class="topAlign">Indicates the item is a focus scope. See <a href="qtquick-input-focus.html">Keyboard Focus in Qt Quick</a> for more information.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemHasContents</code></td><td class="topAlign tblval"><code>0x08</code></td><td class="topAlign">Indicates the item has visual content and should be rendered by the scene graph.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemAcceptsDrops</code></td><td class="topAlign tblval"><code>0x10</code></td><td class="topAlign">Indicates the item accepts drag and drop events.</td></tr>
</table></div>
<p>The Flags type is a typedef for <a href="">QFlags</a>&lt;Flag&gt;. It stores an OR combination of Flag values.</p>
<p><b>See also </b><a href="qquickitem.html#setFlag">setFlag</a>(), <a href="qquickitem.html#setFlags">setFlags</a>(), and <a href="qquickitem.html#flags">flags</a>().</p>
<!-- @@@Flag -->
<!-- $$$ItemChange$$$ItemChildAddedChange$$$ItemChildRemovedChange$$$ItemSceneChange$$$ItemVisibleHasChanged$$$ItemParentHasChanged$$$ItemOpacityHasChanged$$$ItemActiveFocusHasChanged$$$ItemRotationHasChanged$$$ItemAntialiasingHasChanged$$$ItemDevicePixelRatioHasChanged -->
<h3 class="fn" id="ItemChange-enum"><a name="ItemChange-enum"></a>enum QQuickItem::<span class="name">ItemChange</span></h3>
<p>Used in conjunction with <a href="qquickitem.html#itemChange">QQuickItem::itemChange</a>() to notify the item about certain types of changes.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemChildAddedChange</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">A child was added. <a href="qquickitem-itemchangedata.html#item-var">ItemChangeData::item</a> contains the added child.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemChildRemovedChange</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">A child was removed. <a href="qquickitem-itemchangedata.html#item-var">ItemChangeData::item</a> contains the removed child.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemSceneChange</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The item was added to or removed from a scene. The <a href="qquickwindow.html">QQuickWindow</a> rendering the scene is specified in using <a href="qquickitem-itemchangedata.html#window-var">ItemChangeData::window</a>. The window parameter is null when the item is removed from a scene.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemVisibleHasChanged</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The item's visibility has changed. <a href="qquickitem-itemchangedata.html#boolValue-var">ItemChangeData::boolValue</a> contains the new visibility.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemParentHasChanged</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The item's parent has changed. <a href="qquickitem-itemchangedata.html#item-var">ItemChangeData::item</a> contains the new parent.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemOpacityHasChanged</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">The item's opacity has changed. <a href="qquickitem-itemchangedata.html#realValue-var">ItemChangeData::realValue</a> contains the new opacity.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemActiveFocusHasChanged</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">The item's focus has changed. <a href="qquickitem-itemchangedata.html#boolValue-var">ItemChangeData::boolValue</a> contains whether the item has focus or not.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemRotationHasChanged</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">The item's rotation has changed. <a href="qquickitem-itemchangedata.html#realValue-var">ItemChangeData::realValue</a> contains the new rotation.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemDevicePixelRatioHasChanged</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">The device pixel ratio of the screen the item is on has changed. ItemChangedData::realValue contains the new device pixel ratio.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::ItemAntialiasingHasChanged</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">The antialiasing has changed. The current (boolean) value can be found in <a href="qquickitem.html#antialiasing-prop">QQuickItem::antialiasing</a>.</td></tr>
</table></div>
<!-- @@@ItemChange -->
<!-- $$$TransformOrigin$$$TopLeft$$$Top$$$TopRight$$$Left$$$Center$$$Right$$$BottomLeft$$$Bottom$$$BottomRight -->
<h3 class="fn" id="TransformOrigin-enum"><a name="TransformOrigin-enum"></a>enum QQuickItem::<span class="name">TransformOrigin</span></h3>
<p>Controls the point about which simple transforms like scale apply.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QQuickItem::TopLeft</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The top-left corner of the item.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::Top</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The center point of the top of the item.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::TopRight</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The top-right corner of the item.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::Left</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The left most point of the vertical middle.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::Center</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The center of the item.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::Right</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">The right most point of the vertical middle.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::BottomLeft</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">The bottom-left corner of the item.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::Bottom</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">The center point of the bottom of the item.</td></tr>
<tr><td class="topAlign"><code>QQuickItem::BottomRight</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">The bottom-right corner of the item.</td></tr>
</table></div>
<p><b>See also </b><a href="qquickitem.html#transformOrigin-prop">transformOrigin</a>() and <a href="qquickitem.html#transformOrigin-prop">setTransformOrigin</a>().</p>
<!-- @@@TransformOrigin -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$activeFocus-prop$$$hasActiveFocus -->
<h3 class="fn" id="activeFocus-prop"><a name="activeFocus-prop"></a><span class="name">activeFocus</span> : const <span class="type">bool</span></h3>
<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="qquickitem.html#focus-prop">focus</a> on an item and its enclosing <a href="qml-qtquick-focusscope.html">FocusScope</a> objects. In the following example, the <code>input</code> and <code>focusScope</code> objects will have active focus, while the root rectangle object will not.</p>
<pre class="qml">

  import QtQuick 2.0

  <span class="type">Rectangle</span> {
      <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>

      <span class="type">FocusScope</span> {
          <span class="name">focus</span>: <span class="number">true</span>

          <span class="type">TextInput</span> {
              <span class="name">id</span>: <span class="name">input</span>
              <span class="name">focus</span>: <span class="number">true</span>
          }
      }
  }

</pre>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>hasActiveFocus</b></span>() const</td></tr>
</table></div>
<p><b>See also </b><a href="qquickitem.html#focus-prop">focus</a> and <a href="qtquick-input-focus.html">Keyboard Focus in Qt Quick</a>.</p>
<!-- @@@activeFocus -->
<!-- $$$activeFocusOnTab-prop$$$activeFocusOnTab$$$setActiveFocusOnTabbool -->
<h3 class="fn" id="activeFocusOnTab-prop"><a name="activeFocusOnTab-prop"></a><span class="name">activeFocusOnTab</span> : <span class="type">bool</span></h3>
<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><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>activeFocusOnTab</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setActiveFocusOnTab</b></span>(<i>bool</i>)</td></tr>
</table></div>
<!-- @@@activeFocusOnTab -->
<!-- $$$antialiasing-prop$$$antialiasing$$$setAntialiasingbool$$$resetAntialiasing -->
<h3 class="fn" id="antialiasing-prop"><a name="antialiasing-prop"></a><span class="name">antialiasing</span> : <span class="type">bool</span></h3>
<p>Specifies whether the item is antialiased or not</p>
<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>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>antialiasing</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAntialiasing</b></span>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>resetAntialiasing</b></span>()</td></tr>
</table></div>
<!-- @@@antialiasing -->
<!-- $$$baselineOffset-prop$$$baselineOffset$$$setBaselineOffsetqreal -->
<h3 class="fn" id="baselineOffset-prop"><a name="baselineOffset-prop"></a><span class="name">baselineOffset</span> : <span class="type">qreal</span></h3>
<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>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>baselineOffset</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setBaselineOffset</b></span>(<i>qreal</i>)</td></tr>
</table></div>
<!-- @@@baselineOffset -->
<!-- $$$childrenRect-prop$$$childrenRect -->
<h3 class="fn" id="childrenRect-prop"><a name="childrenRect-prop"></a><span class="name">childrenRect</span> : const <span class="type">QRectF</span></h3>
<p>This property holds the collective position and size of the item's children.</p>
<p>This property is useful if you need to access the collective geometry of an item's children in order to correctly size the item.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QRectF </td><td class="memItemRight bottomAlign"><span class="name"><b>childrenRect</b></span>()</td></tr>
</table></div>
<!-- @@@childrenRect -->
<!-- $$$clip-prop$$$clip$$$setClipbool -->
<h3 class="fn" id="clip-prop"><a name="clip-prop"></a><span class="name">clip</span> : <span class="type">bool</span></h3>
<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. If you set clipping during an item's paint operation, remember to re-set it to prevent clipping the rest of your scene.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>clip</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setClip</b></span>(<i>bool</i>)</td></tr>
</table></div>
<!-- @@@clip -->
<!-- $$$enabled-prop$$$isEnabled$$$setEnabledbool -->
<h3 class="fn" id="enabled-prop"><a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></h3>
<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="qquickitem.html#activeFocus-prop">activeFocus</a> to be set to <code>false</code>, and this item will longer receive keyboard events.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isEnabled</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setEnabled</b></span>(<i>bool</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qquickitem.html#visible-prop">visible</a>.</p>
<!-- @@@enabled -->
<!-- $$$focus-prop$$$hasFocus$$$setFocusbool$$$setFocusboolQt::FocusReason -->
<h3 class="fn" id="focus-prop"><a name="focus-prop"></a><span class="name">focus</span> : <span class="type">bool</span></h3>
<p>This property holds whether the item has focus within the enclosing <a href="qml-qtquick-focusscope.html">FocusScope</a>. If true, this item will gain active focus when the enclosing <a href="qml-qtquick-focusscope.html">FocusScope</a> gains active focus.</p>
<p>In the following example, <code>input</code> will be given active focus when <code>scope</code> gains active focus:</p>
<pre class="qml">

  import QtQuick 2.0

  <span class="type">Rectangle</span> {
      <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>

      <span class="type">FocusScope</span> {
          <span class="name">id</span>: <span class="name">scope</span>

          <span class="type">TextInput</span> {
              <span class="name">id</span>: <span class="name">input</span>
              <span class="name">focus</span>: <span class="number">true</span>
          }
      }
  }

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

  <span class="type">Rectangle</span> {
      <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>

      <span class="type">TextInput</span> {
            <span class="name">id</span>: <span class="name">input</span>
            <span class="name">focus</span>: <span class="number">true</span>
      }
  }

</pre>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>hasFocus</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFocus</b></span>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFocus</b></span>(bool <i>focus</i>, Qt::FocusReason <i>reason</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qquickitem.html#activeFocus-prop">activeFocus</a> and <a href="qtquick-input-focus.html">Keyboard Focus in Qt Quick</a>.</p>
<!-- @@@focus -->
<!-- $$$height-prop$$$height$$$setHeightqreal$$$resetHeight -->
<h3 class="fn" id="height-prop"><a name="height-prop"></a><span class="name">height</span> : <span class="type">qreal</span></h3>
<p>This property holds the height of this item.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>height</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setHeight</b></span>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>resetHeight</b></span>()</td></tr>
</table></div>
<!-- @@@height -->
<!-- $$$implicitHeight-prop$$$implicitHeight$$$setImplicitHeightqreal -->
<h3 class="fn" id="implicitHeight-prop"><a name="implicitHeight-prop"></a><span class="name">implicitHeight</span> : <span class="type">qreal</span></h3>
<p>Defines the natural width or height of the Item if no <a href="qquickitem.html#width-prop">width</a> or <a href="qquickitem.html#height-prop">height</a> is specified.</p>
<p>The default implicit size for most items is 0x0, however some items have an inherent implicit size which cannot be overridden, for example, <a href="qml-qtquick-image.html">Image</a> and <a href="qml-qtquick-text.html">Text</a>.</p>
<p>Setting the implicit size is useful for defining components that have a preferred size based on their content, for example:</p>
<pre class="qml">

  <span class="comment">// Label.qml</span>
  import QtQuick 2.0

  <span class="type">Item</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">Image</span> { <span class="name">id</span>: <span class="name">image</span> }
      <span class="type">Text</span> {
          <span class="name">id</span>: <span class="name">text</span>
          <span class="name">wrapMode</span>: <span class="name">Text</span>.<span class="name">Wrap</span>
          <span class="name">anchors</span>.left: <span class="name">image</span>.<span class="name">right</span>; <span class="name">anchors</span>.right: <span class="name">parent</span>.<span class="name">right</span>
          <span class="name">anchors</span>.verticalCenter: <span class="name">parent</span>.<span class="name">verticalCenter</span>
      }
  }

</pre>
<p><b>Note: </b>Using <a href="qquickitem.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><p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>implicitHeight</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setImplicitHeight</b></span>(<i>qreal</i>)</td></tr>
</table></div>
<!-- @@@implicitHeight -->
<!-- $$$implicitWidth-prop$$$implicitWidth$$$setImplicitWidthqreal -->
<h3 class="fn" id="implicitWidth-prop"><a name="implicitWidth-prop"></a><span class="name">implicitWidth</span> : <span class="type">qreal</span></h3>
<p>Defines the natural width or height of the Item if no <a href="qquickitem.html#width-prop">width</a> or <a href="qquickitem.html#height-prop">height</a> is specified.</p>
<p>The default implicit size for most items is 0x0, however some items have an inherent implicit size which cannot be overridden, for example, <a href="qml-qtquick-image.html">Image</a> and <a href="qml-qtquick-text.html">Text</a>.</p>
<p>Setting the implicit size is useful for defining components that have a preferred size based on their content, for example:</p>
<pre class="qml">

  <span class="comment">// Label.qml</span>
  import QtQuick 2.0

  <span class="type">Item</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">Image</span> { <span class="name">id</span>: <span class="name">image</span> }
      <span class="type">Text</span> {
          <span class="name">id</span>: <span class="name">text</span>
          <span class="name">wrapMode</span>: <span class="name">Text</span>.<span class="name">Wrap</span>
          <span class="name">anchors</span>.left: <span class="name">image</span>.<span class="name">right</span>; <span class="name">anchors</span>.right: <span class="name">parent</span>.<span class="name">right</span>
          <span class="name">anchors</span>.verticalCenter: <span class="name">parent</span>.<span class="name">verticalCenter</span>
      }
  }

</pre>
<p><b>Note: </b>Using implicitWidth of <a href="qml-qtquick-text.html">Text</a> or <a href="qml-qtquick-textedit.html">TextEdit</a> and setting the width explicitly incurs a performance penalty as the text must be laid out twice.</p><p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qquickitem.html#implicitWidth">implicitWidth</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setImplicitWidth</b></span>(<i>qreal</i>)</td></tr>
</table></div>
<!-- @@@implicitWidth -->
<!-- $$$opacity-prop$$$opacity$$$setOpacityqreal -->
<h3 class="fn" id="opacity-prop"><a name="opacity-prop"></a><span class="name">opacity</span> : <span class="type">qreal</span></h3>
<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>
<p>Values outside the range of 0 to 1 will be clamped.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-item_opacity1.png" alt="" /></p></td><td ><pre class="qml">

  <span class="type">Item</span> {
      <span class="type">Rectangle</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">Rectangle</span> {
              <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
              <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
          }
      }
  }

</pre>
</td></tr>
<tr valign="top" class="even"><td ><p class="centerAlign"><img src="images/declarative-item_opacity2.png" alt="" /></p></td><td ><pre class="qml">

  <span class="type">Item</span> {
      <span class="type">Rectangle</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">Rectangle</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="qquickitem.html#visible-prop">visible</a> property to <code>false</code> stops mouse events, and setting the <a href="qquickitem.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>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>opacity</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOpacity</b></span>(<i>qreal</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qquickitem.html#visible-prop">visible</a>.</p>
<!-- @@@opacity -->
<!-- $$$parent-prop$$$parentItem$$$setParentItemQQuickItem* -->
<h3 class="fn" id="parent-prop"><a name="parent-prop"></a><span class="name">parent</span> : <span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *</h3>
<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><p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QQuickItem *</td><td class="memItemRight bottomAlign"><span class="name"><b>parentItem</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setParentItem</b></span>(QQuickItem *<i>parent</i>)</td></tr>
</table></div>
<!-- @@@parent -->
<!-- $$$rotation-prop$$$rotation$$$setRotationqreal -->
<h3 class="fn" id="rotation-prop"><a name="rotation-prop"></a><span class="name">rotation</span> : <span class="type">qreal</span></h3>
<p>This property holds the rotation of the item in degrees clockwise around its <a href="qquickitem.html#transformOrigin-prop">transformOrigin</a>.</p>
<p>The default value is 0 degrees (that is, no rotation).</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-rotation.png" alt="" /></p></td><td ><pre class="qml">

  <span class="type">Rectangle</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">Rectangle</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>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>rotation</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setRotation</b></span>(<i>qreal</i>)</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>
<!-- @@@rotation -->
<!-- $$$scale-prop$$$scale$$$setScaleqreal -->
<h3 class="fn" id="scale-prop"><a name="scale-prop"></a><span class="name">scale</span> : <span class="type">qreal</span></h3>
<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="qquickitem.html#transformOrigin-prop">transformOrigin</a>.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-scale.png" alt="" /></p></td><td ><pre class="qml">

  import QtQuick 2.0

  <span class="type">Rectangle</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">Rectangle</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">Rectangle</span> {
          <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
          <span class="name">x</span>: <span class="number">25</span>; <span class="name">y</span>: <span class="number">25</span>; <span class="name">width</span>: <span class="number">50</span>; <span class="name">height</span>: <span class="number">50</span>
          <span class="name">scale</span>: <span class="number">1.4</span>
      }
  }

</pre>
</td></tr>
</table></div>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>scale</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setScale</b></span>(<i>qreal</i>)</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>
<!-- @@@scale -->
<!-- $$$smooth-prop$$$smooth$$$setSmoothbool -->
<h3 class="fn" id="smooth-prop"><a name="smooth-prop"></a><span class="name">smooth</span> : <span class="type">bool</span></h3>
<p>Specifies whether the item is smoothed or not</p>
<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>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>smooth</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSmooth</b></span>(<i>bool</i>)</td></tr>
</table></div>
<!-- @@@smooth -->
<!-- $$$state-prop$$$state$$$setStateconstQString& -->
<h3 class="fn" id="state-prop"><a name="state-prop"></a><span class="name">state</span> : <span class="type">QString</span></h3>
<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>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>state</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setState</b></span>(<i>const QString &amp;</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qtquick-statesanimations-states.html">Qt Quick States</a>.</p>
<!-- @@@state -->
<!-- $$$transformOrigin-prop$$$transformOrigin$$$setTransformOriginTransformOrigin -->
<h3 class="fn" id="transformOrigin-prop"><a name="transformOrigin-prop"></a><span class="name">transformOrigin</span> : <span class="type"><a href="qquickitem.html#TransformOrigin-enum">TransformOrigin</a></span></h3>
<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><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> TransformOrigin </td><td class="memItemRight bottomAlign"><span class="name"><b>transformOrigin</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTransformOrigin</b></span>(<i>TransformOrigin</i>)</td></tr>
</table></div>
<!-- @@@transformOrigin -->
<!-- $$$visible-prop$$$isVisible$$$setVisiblebool -->
<h3 class="fn" id="visible-prop"><a name="visible-prop"></a><span class="name">visible</span> : <span class="type">bool</span></h3>
<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="qquickitem.html#focus-prop">focus</a> if it has been set. (In contrast, setting the <a href="qquickitem.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>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isVisible</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVisible</b></span>(<i>bool</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qtquick-effects-topic.html#opacity">opacity</a> and <a href="qquickitem.html#enabled-prop">enabled</a>.</p>
<!-- @@@visible -->
<!-- $$$width-prop$$$width$$$setWidthqreal$$$resetWidth -->
<h3 class="fn" id="width-prop"><a name="width-prop"></a><span class="name">width</span> : <span class="type">qreal</span></h3>
<p>This property holds the width of this item.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>width</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setWidth</b></span>(<i>qreal</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>resetWidth</b></span>()</td></tr>
</table></div>
<!-- @@@width -->
<!-- $$$x-prop$$$x$$$setXqreal -->
<h3 class="fn" id="x-prop"><a name="x-prop"></a><span class="name">x</span> : <span class="type">qreal</span></h3>
<p>Defines the item's x position relative to its parent.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>x</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setX</b></span>(<i>qreal</i>)</td></tr>
</table></div>
<!-- @@@x -->
<!-- $$$y-prop$$$y$$$setYqreal -->
<h3 class="fn" id="y-prop"><a name="y-prop"></a><span class="name">y</span> : <span class="type">qreal</span></h3>
<p>Defines the item's y position relative to its parent.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>y</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setY</b></span>(<i>qreal</i>)</td></tr>
</table></div>
<!-- @@@y -->
<!-- $$$z-prop$$$z$$$setZqreal -->
<h3 class="fn" id="z-prop"><a name="z-prop"></a><span class="name">z</span> : <span class="type">qreal</span></h3>
<p>Sets the stacking order of sibling items. By default the stacking order is 0.</p>
<p>Items with a higher stacking value are drawn on top of siblings with a lower stacking order. Items with the same stacking value are drawn bottom up in the order they appear. Items with a negative stacking value are drawn under their parent's content.</p>
<p>The following example shows the various effects of stacking order.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/declarative-item_stacking1.png" alt="" /></p></td><td >Same <code>z</code> - later children above earlier children:<pre class="qml">

  <span class="type">Item</span> {
      <span class="type">Rectangle</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">Rectangle</span> {
          <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
          <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
      }
  }

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

  <span class="type">Item</span> {
      <span class="type">Rectangle</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">Rectangle</span> {
          <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
          <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
      }
  }

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

  <span class="type">Item</span> {
      <span class="type">Rectangle</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">Rectangle</span> {
              <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
              <span class="name">x</span>: <span class="number">50</span>; <span class="name">y</span>: <span class="number">50</span>; <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
          }
      }
  }

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

  <span class="type">Item</span> {
      <span class="type">Rectangle</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">Rectangle</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>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>z</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setZ</b></span>(<i>qreal</i>)</td></tr>
</table></div>
<!-- @@@z -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QQuickItem[overload1]$$$QQuickItemQQuickItem* -->
<h3 class="fn" id="QQuickItem"><a name="QQuickItem"></a>QQuickItem::<span class="name">QQuickItem</span>(<span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a <a href="qquickitem.html">QQuickItem</a> with the given <i>parent</i>.</p>
<!-- @@@QQuickItem -->
<!-- $$$~QQuickItem[overload1]$$$~QQuickItem -->
<h3 class="fn" id="dtor.QQuickItem"><a name="dtor.QQuickItem"></a><code>[virtual] </code>QQuickItem::<span class="name">~QQuickItem</span>()</h3>
<p>Destroys the <a href="qquickitem.html">QQuickItem</a>.</p>
<!-- @@@~QQuickItem -->
<!-- $$$acceptHoverEvents[overload1]$$$acceptHoverEvents -->
<h3 class="fn" id="acceptHoverEvents"><a name="acceptHoverEvents"></a><span class="type">bool</span> QQuickItem::<span class="name">acceptHoverEvents</span>() const</h3>
<p>Returns whether hover events are accepted by this item.</p>
<p>The default value is false.</p>
<p>If this is false, then the item will not receive any hover events through the <a href="qquickitem.html#hoverEnterEvent">hoverEnterEvent</a>(), <a href="qquickitem.html#hoverMoveEvent">hoverMoveEvent</a>() and <a href="qquickitem.html#hoverLeaveEvent">hoverLeaveEvent</a>() functions.</p>
<p><b>See also </b><a href="qquickitem.html#setAcceptHoverEvents">setAcceptHoverEvents</a>().</p>
<!-- @@@acceptHoverEvents -->
<!-- $$$acceptedMouseButtons[overload1]$$$acceptedMouseButtons -->
<h3 class="fn" id="acceptedMouseButtons"><a name="acceptedMouseButtons"></a><span class="type">Qt::MouseButtons</span> QQuickItem::<span class="name">acceptedMouseButtons</span>() const</h3>
<p>Returns the mouse buttons accepted by this item.</p>
<p>The default value is Qt::NoButton; that is, no mouse buttons are accepted.</p>
<p>If an item does not accept the mouse button for a particular mouse event, the mouse event will not be delivered to the item and will be delivered to the next item in the item hierarchy instead.</p>
<p><b>See also </b><a href="qquickitem.html#setAcceptedMouseButtons">setAcceptedMouseButtons</a>().</p>
<!-- @@@acceptedMouseButtons -->
<!-- $$$childAt[overload1]$$$childAtqrealqreal -->
<h3 class="fn" id="childAt"><a name="childAt"></a><span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *QQuickItem::<span class="name">childAt</span>(<span class="type">qreal</span> <i>x</i>, <span class="type">qreal</span> <i>y</i>) const</h3>
<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 0 if there is no such item.</p>
<!-- @@@childAt -->
<!-- $$$childItems[overload1]$$$childItems -->
<h3 class="fn" id="childItems"><a name="childItems"></a><span class="type">QList</span>&lt;<span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *&gt; QQuickItem::<span class="name">childItems</span>() const</h3>
<p>Returns the children of this item.</p>
<!-- @@@childItems -->
<!-- $$$childMouseEventFilter[overload1]$$$childMouseEventFilterQQuickItem*QEvent* -->
<h3 class="fn" id="childMouseEventFilter"><a name="childMouseEventFilter"></a><code>[virtual protected] </code><span class="type">bool</span> QQuickItem::<span class="name">childMouseEventFilter</span>(<span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *<i>item</i>, <span class="type">QEvent</span> *<i>event</i>)</h3>
<p>Reimplement this method to filter the mouse events that are received by this item's children.</p>
<p>This method will only be called if <a href="qquickitem.html#filtersChildMouseEvents">filtersChildMouseEvents</a>() is true.</p>
<p>Return true if the specified <i>event</i> should not be passed onto the specified child <i>item</i>, and false otherwise.</p>
<p><b>See also </b><a href="qquickitem.html#setFiltersChildMouseEvents">setFiltersChildMouseEvents</a>().</p>
<!-- @@@childMouseEventFilter -->
<!-- $$$classBegin[overload1]$$$classBegin -->
<h3 class="fn" id="classBegin"><a name="classBegin"></a><code>[protected] </code><span class="type">void</span> QQuickItem::<span class="name">classBegin</span>()</h3>
<p>Derived classes should call the base class method before adding their own action to perform at classBegin.</p>
<!-- @@@classBegin -->
<!-- $$$componentComplete[overload1]$$$componentComplete -->
<h3 class="fn" id="componentComplete"><a name="componentComplete"></a><code>[protected] </code><span class="type">void</span> QQuickItem::<span class="name">componentComplete</span>()</h3>
<p>Derived classes should call the base class method before adding their own actions to perform at componentComplete.</p>
<!-- @@@componentComplete -->
<!-- $$$contains[overload1]$$$containsconstQPointF& -->
<h3 class="fn" id="contains"><a name="contains"></a><code>[virtual] </code><span class="type">bool</span> QQuickItem::<span class="name">contains</span>(const <span class="type">QPointF</span> &amp;<i>point</i>) const</h3>
<p>Returns true if this item contains <i>point</i>, which is in local coordinates; returns false otherwise.</p>
<p>This function can be overwritten in order to handle point collisions in items with custom shapes. The default implementation checks if the point is inside the item's bounding rect.</p>
<p>Note that this method is generally used to check whether the item is under the mouse cursor, and for that reason, the implementation of this function should be as light-weight as possible.</p>
<!-- @@@contains -->
<!-- $$$cursor[overload1]$$$cursor -->
<h3 class="fn" id="cursor"><a name="cursor"></a><span class="type">QCursor</span> QQuickItem::<span class="name">cursor</span>() const</h3>
<p>Returns the cursor shape for this item.</p>
<p>The mouse cursor will assume this shape when it is over this item, unless an override cursor is set. See the list of predefined cursor objects for a range of useful shapes.</p>
<p>If no cursor shape has been set this returns a cursor with the Qt::ArrowCursor shape, however another cursor shape may be displayed if an overlapping item has a valid cursor.</p>
<p><b>See also </b><a href="qquickitem.html#setCursor">setCursor</a>() and <a href="qquickitem.html#unsetCursor">unsetCursor</a>().</p>
<!-- @@@cursor -->
<!-- $$$dragEnterEvent[overload1]$$$dragEnterEventQDragEnterEvent* -->
<h3 class="fn" id="dragEnterEvent"><a name="dragEnterEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">dragEnterEvent</span>(<span class="type">QDragEnterEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive drag-enter events for an item. The event information is provided by the <i>event</i> parameter.</p>
<p>Drag and drop events are only provided if the <a href="qquickitem.html#Flag-enum">ItemAcceptsDrops</a> flag has been set for this item.</p>
<p><b>See also </b><a href="qml-qtquick-drag.html">Drag</a> and Drag and Drop.</p>
<!-- @@@dragEnterEvent -->
<!-- $$$dragLeaveEvent[overload1]$$$dragLeaveEventQDragLeaveEvent* -->
<h3 class="fn" id="dragLeaveEvent"><a name="dragLeaveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">dragLeaveEvent</span>(<span class="type">QDragLeaveEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive drag-leave events for an item. The event information is provided by the <i>event</i> parameter.</p>
<p>Drag and drop events are only provided if the <a href="qquickitem.html#Flag-enum">ItemAcceptsDrops</a> flag has been set for this item.</p>
<p><b>See also </b><a href="qml-qtquick-drag.html">Drag</a> and Drag and Drop.</p>
<!-- @@@dragLeaveEvent -->
<!-- $$$dragMoveEvent[overload1]$$$dragMoveEventQDragMoveEvent* -->
<h3 class="fn" id="dragMoveEvent"><a name="dragMoveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">dragMoveEvent</span>(<span class="type">QDragMoveEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive drag-move events for an item. The event information is provided by the <i>event</i> parameter.</p>
<p>Drag and drop events are only provided if the <a href="qquickitem.html#Flag-enum">ItemAcceptsDrops</a> flag has been set for this item.</p>
<p><b>See also </b><a href="qml-qtquick-drag.html">Drag</a> and Drag and Drop.</p>
<!-- @@@dragMoveEvent -->
<!-- $$$dropEvent[overload1]$$$dropEventQDropEvent* -->
<h3 class="fn" id="dropEvent"><a name="dropEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">dropEvent</span>(<span class="type">QDropEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive drop events for an item. The event information is provided by the <i>event</i> parameter.</p>
<p>Drag and drop events are only provided if the <a href="qquickitem.html#Flag-enum">ItemAcceptsDrops</a> flag has been set for this item.</p>
<p><b>See also </b><a href="qml-qtquick-drag.html">Drag</a> and Drag and Drop.</p>
<!-- @@@dropEvent -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[protected] </code><span class="type">bool</span> QQuickItem::<span class="name">event</span>(<span class="type">QEvent</span> *<i>ev</i>)</h3>
<!-- @@@event -->
<!-- $$$filtersChildMouseEvents[overload1]$$$filtersChildMouseEvents -->
<h3 class="fn" id="filtersChildMouseEvents"><a name="filtersChildMouseEvents"></a><span class="type">bool</span> QQuickItem::<span class="name">filtersChildMouseEvents</span>() const</h3>
<p>Returns whether mouse and touch events of this item's children should be filtered through this item.</p>
<p><b>See also </b><a href="qquickitem.html#setFiltersChildMouseEvents">setFiltersChildMouseEvents</a>() and <a href="qquickitem.html#childMouseEventFilter">childMouseEventFilter</a>().</p>
<!-- @@@filtersChildMouseEvents -->
<!-- $$$flags[overload1]$$$flags -->
<h3 class="fn" id="flags"><a name="flags"></a><span class="type"><a href="qquickitem.html#Flag-enum">Flags</a></span> QQuickItem::<span class="name">flags</span>() const</h3>
<p>Returns the item flags for this item.</p>
<p><b>See also </b><a href="qquickitem.html#setFlags">setFlags</a>() and <a href="qquickitem.html#setFlag">setFlag</a>().</p>
<!-- @@@flags -->
<!-- $$$focusInEvent[overload1]$$$focusInEventQFocusEvent* -->
<h3 class="fn" id="focusInEvent"><a name="focusInEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">focusInEvent</span>(<span class="type">QFocusEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive focus-in events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@focusInEvent -->
<!-- $$$focusOutEvent[overload1]$$$focusOutEventQFocusEvent* -->
<h3 class="fn" id="focusOutEvent"><a name="focusOutEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">focusOutEvent</span>(<span class="type">QFocusEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive focus-out events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@focusOutEvent -->
<!-- $$$forceActiveFocus[overload1]$$$forceActiveFocus -->
<h3 class="fn" id="forceActiveFocus"><a name="forceActiveFocus"></a><span class="type">void</span> QQuickItem::<span class="name">forceActiveFocus</span>()</h3>
<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="qquickitem.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="qquickitem.html#activeFocus-prop">activeFocus</a>.</p>
<!-- @@@forceActiveFocus -->
<!-- $$$forceActiveFocus$$$forceActiveFocusQt::FocusReason -->
<h3 class="fn" id="forceActiveFocus-1"><a name="forceActiveFocus-1"></a><span class="type">void</span> QQuickItem::<span class="name">forceActiveFocus</span>(<span class="type">Qt::FocusReason</span> <i>reason</i>)</h3>
<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="qquickitem.html#focus-prop">focus</a>.</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qquickitem.html#activeFocus-prop">activeFocus</a> and Qt::FocusReason.</p>
<!-- @@@forceActiveFocus -->
<!-- $$$geometryChanged[overload1]$$$geometryChangedconstQRectF&constQRectF& -->
<h3 class="fn" id="geometryChanged"><a name="geometryChanged"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">geometryChanged</span>(const <span class="type">QRectF</span> &amp;<i>newGeometry</i>, const <span class="type">QRectF</span> &amp;<i>oldGeometry</i>)</h3>
<p>This function is called to handle this item's changes in geometry from <i>oldGeometry</i> to <i>newGeometry</i>. If the two geometries are the same, it doesn't do anything.</p>
<p>Derived classes must call the base class method within their implementation.</p>
<!-- @@@geometryChanged -->
<!-- $$$grabMouse[overload1]$$$grabMouse -->
<h3 class="fn" id="grabMouse"><a name="grabMouse"></a><span class="type">void</span> QQuickItem::<span class="name">grabMouse</span>()</h3>
<p>Grabs the mouse input.</p>
<p>This item will receive all mouse events until <a href="qquickitem.html#ungrabMouse">ungrabMouse</a>() is called. Usually this function should not be called, since accepting for example a mouse press event makes sure that the following events are delivered to the item. If an item wants to take over mouse events from the current receiver, it needs to call this function.</p>
<p><b>Warning:</b> This function should be used with caution.</p>
<!-- @@@grabMouse -->
<!-- $$$grabToImage[overload1]$$$grabToImageconstQSize& -->
<h3 class="fn" id="grabToImage"><a name="grabToImage"></a><span class="type">QSharedPointer</span>&lt;<span class="type"><a href="qquickitemgrabresult.html">QQuickItemGrabResult</a></span>&gt; QQuickItem::<span class="name">grabToImage</span>(const <span class="type">QSize</span> &amp;<i>targetSize</i> = QSize())</h3>
<p>Grabs the item into an in-memory image.</p>
<p>The grab happens asynchronously and the signal <a href="qquickitemgrabresult.html#ready">QQuickItemGrabResult::ready</a>() is emitted when the grab has been completed.</p>
<p>Use <i>targetSize</i> to specify the size of the target image. By default, the result will have the same size as item.</p>
<p>If the grab could not be initiated, the function returns <code>null</code>.</p>
<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><p><b>See also </b><a href="qquickwindow.html#grabWindow">QQuickWindow::grabWindow</a>().</p>
<!-- @@@grabToImage -->
<!-- $$$grabTouchPoints[overload1]$$$grabTouchPointsconstQVector<int>& -->
<h3 class="fn" id="grabTouchPoints"><a name="grabTouchPoints"></a><span class="type">void</span> QQuickItem::<span class="name">grabTouchPoints</span>(const <span class="type">QVector</span>&lt;<span class="type">int</span>&gt; &amp;<i>ids</i>)</h3>
<p>Grabs the touch points specified by <i>ids</i>.</p>
<p>These touch points will be owned by the item until they are released. Alternatively, the grab can be stolen by a filtering item like Flickable. Use <a href="qquickitem.html#setKeepTouchGrab">setKeepTouchGrab</a>() to prevent the grab from being stolen.</p>
<p><b>See also </b><a href="qquickitem.html#ungrabTouchPoints">ungrabTouchPoints</a>() and <a href="qquickitem.html#setKeepTouchGrab">setKeepTouchGrab</a>().</p>
<!-- @@@grabTouchPoints -->
<!-- $$$heightValid[overload1]$$$heightValid -->
<h3 class="fn" id="heightValid"><a name="heightValid"></a><code>[protected] </code><span class="type">bool</span> QQuickItem::<span class="name">heightValid</span>() const</h3>
<p>Returns whether the height property has been set explicitly.</p>
<!-- @@@heightValid -->
<!-- $$$hoverEnterEvent[overload1]$$$hoverEnterEventQHoverEvent* -->
<h3 class="fn" id="hoverEnterEvent"><a name="hoverEnterEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">hoverEnterEvent</span>(<span class="type">QHoverEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive hover-enter events for an item. The event information is provided by the <i>event</i> parameter.</p>
<p>Hover events are only provided if <a href="qquickitem.html#acceptHoverEvents">acceptHoverEvents</a>() is true.</p>
<!-- @@@hoverEnterEvent -->
<!-- $$$hoverLeaveEvent[overload1]$$$hoverLeaveEventQHoverEvent* -->
<h3 class="fn" id="hoverLeaveEvent"><a name="hoverLeaveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">hoverLeaveEvent</span>(<span class="type">QHoverEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive hover-leave events for an item. The event information is provided by the <i>event</i> parameter.</p>
<p>Hover events are only provided if <a href="qquickitem.html#acceptHoverEvents">acceptHoverEvents</a>() is true.</p>
<!-- @@@hoverLeaveEvent -->
<!-- $$$hoverMoveEvent[overload1]$$$hoverMoveEventQHoverEvent* -->
<h3 class="fn" id="hoverMoveEvent"><a name="hoverMoveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">hoverMoveEvent</span>(<span class="type">QHoverEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive hover-move events for an item. The event information is provided by the <i>event</i> parameter.</p>
<p>Hover events are only provided if <a href="qquickitem.html#acceptHoverEvents">acceptHoverEvents</a>() is true.</p>
<!-- @@@hoverMoveEvent -->
<!-- $$$implicitWidth -->
<h3 class="fn" id="implicitWidth"><a name="implicitWidth"></a><span class="type">qreal</span> QQuickItem::<span class="name">implicitWidth</span>() const</h3>
<p>Returns the width of the item that is implied by other properties that determine the content.</p>
<p><b>Note:</b> Getter function for property <a href="qquickitem.html#implicitWidth-prop">implicitWidth</a>. </p><p><b>See also </b><a href="qquickitem.html#implicitWidth-prop">setImplicitWidth</a>().</p>
<!-- @@@implicitWidth -->
<!-- $$$inputMethodEvent[overload1]$$$inputMethodEventQInputMethodEvent* -->
<h3 class="fn" id="inputMethodEvent"><a name="inputMethodEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">inputMethodEvent</span>(<span class="type">QInputMethodEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive input method events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@inputMethodEvent -->
<!-- $$$inputMethodQuery[overload1]$$$inputMethodQueryQt::InputMethodQuery -->
<h3 class="fn" id="inputMethodQuery"><a name="inputMethodQuery"></a><code>[virtual] </code><span class="type">QVariant</span> QQuickItem::<span class="name">inputMethodQuery</span>(<span class="type">Qt::InputMethodQuery</span> <i>query</i>) const</h3>
<p>This method is only relevant for input items.</p>
<p>If this item is an input item, this method should be reimplemented to return the relevant input method flags for the given <i>query</i>.</p>
<p><b>See also </b>QWidget::inputMethodQuery().</p>
<!-- @@@inputMethodQuery -->
<!-- $$$isAncestorOf[overload1]$$$isAncestorOfconstQQuickItem* -->
<h3 class="fn" id="isAncestorOf"><a name="isAncestorOf"></a><span class="type">bool</span> QQuickItem::<span class="name">isAncestorOf</span>(const <span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *<i>child</i>) const</h3>
<p>Returns <code>true</code> if this item is an ancestor of <i>child</i> (i.e&#x2e;, if this item is <i>child</i>'s parent, or one of <i>child</i>'s parent's ancestors).</p>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qquickitem.html#parent-prop">parentItem</a>().</p>
<!-- @@@isAncestorOf -->
<!-- $$$isComponentComplete[overload1]$$$isComponentComplete -->
<h3 class="fn" id="isComponentComplete"><a name="isComponentComplete"></a><code>[protected] </code><span class="type">bool</span> QQuickItem::<span class="name">isComponentComplete</span>() const</h3>
<p>Returns true if construction of the QML component is complete; otherwise returns false.</p>
<p>It is often desirable to delay some processing until the component is completed.</p>
<p><b>See also </b><a href="qquickitem.html#componentComplete">componentComplete</a>().</p>
<!-- @@@isComponentComplete -->
<!-- $$$isFocusScope[overload1]$$$isFocusScope -->
<h3 class="fn" id="isFocusScope"><a name="isFocusScope"></a><span class="type">bool</span> QQuickItem::<span class="name">isFocusScope</span>() const</h3>
<p>Returns true if this item is a focus scope, and false otherwise.</p>
<!-- @@@isFocusScope -->
<!-- $$$isTextureProvider[overload1]$$$isTextureProvider -->
<h3 class="fn" id="isTextureProvider"><a name="isTextureProvider"></a><code>[virtual] </code><span class="type">bool</span> QQuickItem::<span class="name">isTextureProvider</span>() const</h3>
<p>Returns true if this item is a texture provider. The default implementation returns false.</p>
<p>This function can be called from any thread.</p>
<!-- @@@isTextureProvider -->
<!-- $$$itemChange[overload1]$$$itemChangeItemChangeconstItemChangeData& -->
<h3 class="fn" id="itemChange"><a name="itemChange"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">itemChange</span>(<span class="type"><a href="qquickitem.html#ItemChange-enum">ItemChange</a></span> <i>change</i>, const <span class="type"><a href="qquickitem-itemchangedata.html">ItemChangeData</a></span> &amp;<i>value</i>)</h3>
<p>Called when <i>change</i> occurs for this item.</p>
<p><i>value</i> contains extra information relating to the change, when applicable.</p>
<p>If you re-implement this method in a subclass, be sure to call</p>
<pre class="cpp">

  <span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span><span class="operator">::</span>itemChange(change<span class="operator">,</span> value);

</pre>
<p>typically at the end of your implementation, to ensure the <a href="qquickitem.html#windowChanged">windowChanged</a>() signal will be emitted.</p>
<!-- @@@itemChange -->
<!-- $$$keepMouseGrab[overload1]$$$keepMouseGrab -->
<h3 class="fn" id="keepMouseGrab"><a name="keepMouseGrab"></a><span class="type">bool</span> QQuickItem::<span class="name">keepMouseGrab</span>() const</h3>
<p>Returns whether mouse input should exclusively remain with this item.</p>
<p><b>See also </b><a href="qquickitem.html#setKeepMouseGrab">setKeepMouseGrab</a>().</p>
<!-- @@@keepMouseGrab -->
<!-- $$$keepTouchGrab[overload1]$$$keepTouchGrab -->
<h3 class="fn" id="keepTouchGrab"><a name="keepTouchGrab"></a><span class="type">bool</span> QQuickItem::<span class="name">keepTouchGrab</span>() const</h3>
<p>Returns whether the touch points grabbed by this item should exclusively remain with this item.</p>
<p><b>See also </b><a href="qquickitem.html#setKeepTouchGrab">setKeepTouchGrab</a>() and <a href="qquickitem.html#keepMouseGrab">keepMouseGrab</a>().</p>
<!-- @@@keepTouchGrab -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn" id="keyPressEvent"><a name="keyPressEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">keyPressEvent</span>(<span class="type">QKeyEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive key press events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@keyPressEvent -->
<!-- $$$keyReleaseEvent[overload1]$$$keyReleaseEventQKeyEvent* -->
<h3 class="fn" id="keyReleaseEvent"><a name="keyReleaseEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">keyReleaseEvent</span>(<span class="type">QKeyEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive key release events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@keyReleaseEvent -->
<!-- $$$mapFromGlobal[overload1]$$$mapFromGlobalconstQPointF& -->
<h3 class="fn" id="mapFromGlobal"><a name="mapFromGlobal"></a><span class="type">QPointF</span> QQuickItem::<span class="name">mapFromGlobal</span>(const <span class="type">QPointF</span> &amp;<i>point</i>) const</h3>
<p>Maps the given <i>point</i> in the global screen coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate.</p>
<p>For example, this may be helpful to add a popup to a Qt Quick component.</p>
<p><b>Note: </b>Window positioning is done by the window manager and this value is treated only as a hint. So, the resulting window position may differ from what is expected.</p><p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapFromGlobal -->
<!-- $$$mapFromItem[overload1]$$$mapFromItemconstQQuickItem*constQPointF& -->
<h3 class="fn" id="mapFromItem"><a name="mapFromItem"></a><span class="type">QPointF</span> QQuickItem::<span class="name">mapFromItem</span>(const <span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *<i>item</i>, const <span class="type">QPointF</span> &amp;<i>point</i>) const</h3>
<p>Maps the given <i>point</i> in <i>item</i>'s coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate.</p>
<p>If <i>item</i> is 0, this maps <i>point</i> from the coordinate system of the scene.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapFromItem -->
<!-- $$$mapFromScene[overload1]$$$mapFromSceneconstQPointF& -->
<h3 class="fn" id="mapFromScene"><a name="mapFromScene"></a><span class="type">QPointF</span> QQuickItem::<span class="name">mapFromScene</span>(const <span class="type">QPointF</span> &amp;<i>point</i>) const</h3>
<p>Maps the given <i>point</i> in the scene's coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapFromScene -->
<!-- $$$mapRectFromItem[overload1]$$$mapRectFromItemconstQQuickItem*constQRectF& -->
<h3 class="fn" id="mapRectFromItem"><a name="mapRectFromItem"></a><span class="type">QRectF</span> QQuickItem::<span class="name">mapRectFromItem</span>(const <span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *<i>item</i>, const <span class="type">QRectF</span> &amp;<i>rect</i>) const</h3>
<p>Maps the given <i>rect</i> in <i>item</i>'s coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value.</p>
<p>If <i>item</i> is 0, this maps <i>rect</i> from the coordinate system of the scene.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapRectFromItem -->
<!-- $$$mapRectFromScene[overload1]$$$mapRectFromSceneconstQRectF& -->
<h3 class="fn" id="mapRectFromScene"><a name="mapRectFromScene"></a><span class="type">QRectF</span> QQuickItem::<span class="name">mapRectFromScene</span>(const <span class="type">QRectF</span> &amp;<i>rect</i>) const</h3>
<p>Maps the given <i>rect</i> in the scene's coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapRectFromScene -->
<!-- $$$mapRectToItem[overload1]$$$mapRectToItemconstQQuickItem*constQRectF& -->
<h3 class="fn" id="mapRectToItem"><a name="mapRectToItem"></a><span class="type">QRectF</span> QQuickItem::<span class="name">mapRectToItem</span>(const <span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *<i>item</i>, const <span class="type">QRectF</span> &amp;<i>rect</i>) const</h3>
<p>Maps the given <i>rect</i> in this item's coordinate system to the equivalent rectangular area within <i>item</i>'s coordinate system, and returns the mapped rectangle value.</p>
<p>If <i>item</i> is 0, this maps <i>rect</i> to the coordinate system of the scene.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapRectToItem -->
<!-- $$$mapRectToScene[overload1]$$$mapRectToSceneconstQRectF& -->
<h3 class="fn" id="mapRectToScene"><a name="mapRectToScene"></a><span class="type">QRectF</span> QQuickItem::<span class="name">mapRectToScene</span>(const <span class="type">QRectF</span> &amp;<i>rect</i>) const</h3>
<p>Maps the given <i>rect</i> in this item's coordinate system to the equivalent rectangular area within the scene's coordinate system, and returns the mapped rectangle value.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapRectToScene -->
<!-- $$$mapToGlobal[overload1]$$$mapToGlobalconstQPointF& -->
<h3 class="fn" id="mapToGlobal"><a name="mapToGlobal"></a><span class="type">QPointF</span> QQuickItem::<span class="name">mapToGlobal</span>(const <span class="type">QPointF</span> &amp;<i>point</i>) const</h3>
<p>Maps the given <i>point</i> in this item's coordinate system to the equivalent point within global screen coordinate system, and returns the mapped coordinate.</p>
<p>For example, this may be helpful to add a popup to a Qt Quick component.</p>
<p><b>Note: </b>Window positioning is done by the window manager and this value is treated only as a hint. So, the resulting window position may differ from what is expected.</p><p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapToGlobal -->
<!-- $$$mapToItem[overload1]$$$mapToItemconstQQuickItem*constQPointF& -->
<h3 class="fn" id="mapToItem"><a name="mapToItem"></a><span class="type">QPointF</span> QQuickItem::<span class="name">mapToItem</span>(const <span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *<i>item</i>, const <span class="type">QPointF</span> &amp;<i>point</i>) const</h3>
<p>Maps the given <i>point</i> in this item's coordinate system to the equivalent point within <i>item</i>'s coordinate system, and returns the mapped coordinate.</p>
<p>If <i>item</i> is 0, this maps <i>point</i> to the coordinate system of the scene.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapToItem -->
<!-- $$$mapToScene[overload1]$$$mapToSceneconstQPointF& -->
<h3 class="fn" id="mapToScene"><a name="mapToScene"></a><span class="type">QPointF</span> QQuickItem::<span class="name">mapToScene</span>(const <span class="type">QPointF</span> &amp;<i>point</i>) const</h3>
<p>Maps the given <i>point</i> in this item's coordinate system to the equivalent point within the scene's coordinate system, and returns the mapped coordinate.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-coordinates.html">Concepts - Visual Coordinates in Qt Quick</a>.</p>
<!-- @@@mapToScene -->
<!-- $$$mouseDoubleClickEvent[overload1]$$$mouseDoubleClickEventQMouseEvent* -->
<h3 class="fn" id="mouseDoubleClickEvent"><a name="mouseDoubleClickEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">mouseDoubleClickEvent</span>(<span class="type">QMouseEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive mouse double-click events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@mouseDoubleClickEvent -->
<!-- $$$mouseMoveEvent[overload1]$$$mouseMoveEventQMouseEvent* -->
<h3 class="fn" id="mouseMoveEvent"><a name="mouseMoveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">mouseMoveEvent</span>(<span class="type">QMouseEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive mouse move events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@mouseMoveEvent -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn" id="mousePressEvent"><a name="mousePressEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">mousePressEvent</span>(<span class="type">QMouseEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive mouse press events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@mousePressEvent -->
<!-- $$$mouseReleaseEvent[overload1]$$$mouseReleaseEventQMouseEvent* -->
<h3 class="fn" id="mouseReleaseEvent"><a name="mouseReleaseEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">mouseReleaseEvent</span>(<span class="type">QMouseEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive mouse release events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@mouseReleaseEvent -->
<!-- $$$mouseUngrabEvent[overload1]$$$mouseUngrabEvent -->
<h3 class="fn" id="mouseUngrabEvent"><a name="mouseUngrabEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">mouseUngrabEvent</span>()</h3>
<p>This event handler can be reimplemented in a subclass to be notified when a mouse ungrab event has occurred on this item.</p>
<p><b>See also </b><a href="qquickitem.html#ungrabMouse">ungrabMouse</a>().</p>
<!-- @@@mouseUngrabEvent -->
<!-- $$$nextItemInFocusChain[overload1]$$$nextItemInFocusChainbool -->
<h3 class="fn" id="nextItemInFocusChain"><a name="nextItemInFocusChain"></a><span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *QQuickItem::<span class="name">nextItemInFocusChain</span>(<span class="type">bool</span> <i>forward</i> = true)</h3>
<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>
<!-- @@@nextItemInFocusChain -->
<!-- $$$polish[overload1]$$$polish -->
<h3 class="fn" id="polish"><a name="polish"></a><span class="type">void</span> QQuickItem::<span class="name">polish</span>()</h3>
<p>Schedules a polish event for this item.</p>
<p>When the scene graph processes the request, it will call <a href="qquickitem.html#updatePolish">updatePolish</a>() on this item.</p>
<!-- @@@polish -->
<!-- $$$releaseResources[overload1]$$$releaseResources -->
<h3 class="fn" id="releaseResources"><a name="releaseResources"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">releaseResources</span>()</h3>
<p>This function is called when an item should release graphics resources which are not already managed by the nodes returned from <a href="qquickitem.html#updatePaintNode">QQuickItem::updatePaintNode</a>().</p>
<p>This happens when the item is about to be removed from the window it was previously rendering to. The item is guaranteed to have a <a href="qquickitem.html#window">window</a> when the function is called.</p>
<p>The function is called on the GUI thread and the state of the rendering thread, when it is used, is unknown. Objects should not be deleted directly, but instead scheduled for cleanup using <a href="qquickwindow.html#scheduleRenderJob">QQuickWindow::scheduleRenderJob</a>().</p>
<p><b>See also </b><a href="qquickitem.html#graphics-resource-handling">Graphics Resource Handling</a>.</p>
<!-- @@@releaseResources -->
<!-- $$$scopedFocusItem[overload1]$$$scopedFocusItem -->
<h3 class="fn" id="scopedFocusItem"><a name="scopedFocusItem"></a><span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *QQuickItem::<span class="name">scopedFocusItem</span>() const</h3>
<p>If this item is a focus scope, this returns the item in its focus chain that currently has focus.</p>
<p>Returns 0 if this item is not a focus scope.</p>
<!-- @@@scopedFocusItem -->
<!-- $$$setAcceptHoverEvents[overload1]$$$setAcceptHoverEventsbool -->
<h3 class="fn" id="setAcceptHoverEvents"><a name="setAcceptHoverEvents"></a><span class="type">void</span> QQuickItem::<span class="name">setAcceptHoverEvents</span>(<span class="type">bool</span> <i>enabled</i>)</h3>
<p>If <i>enabled</i> is true, this sets the item to accept hover events; otherwise, hover events are not accepted by this item.</p>
<p><b>See also </b><a href="qquickitem.html#acceptHoverEvents">acceptHoverEvents</a>().</p>
<!-- @@@setAcceptHoverEvents -->
<!-- $$$setAcceptedMouseButtons[overload1]$$$setAcceptedMouseButtonsQt::MouseButtons -->
<h3 class="fn" id="setAcceptedMouseButtons"><a name="setAcceptedMouseButtons"></a><span class="type">void</span> QQuickItem::<span class="name">setAcceptedMouseButtons</span>(<span class="type">Qt::MouseButtons</span> <i>buttons</i>)</h3>
<p>Sets the mouse buttons accepted by this item to <i>buttons</i>.</p>
<p><b>See also </b><a href="qquickitem.html#acceptedMouseButtons">acceptedMouseButtons</a>().</p>
<!-- @@@setAcceptedMouseButtons -->
<!-- $$$setCursor[overload1]$$$setCursorconstQCursor& -->
<h3 class="fn" id="setCursor"><a name="setCursor"></a><span class="type">void</span> QQuickItem::<span class="name">setCursor</span>(const <span class="type">QCursor</span> &amp;<i>cursor</i>)</h3>
<p>Sets the <i>cursor</i> shape for this item.</p>
<p><b>See also </b><a href="qquickitem.html#cursor">cursor</a>() and <a href="qquickitem.html#unsetCursor">unsetCursor</a>().</p>
<!-- @@@setCursor -->
<!-- $$$setFiltersChildMouseEvents[overload1]$$$setFiltersChildMouseEventsbool -->
<h3 class="fn" id="setFiltersChildMouseEvents"><a name="setFiltersChildMouseEvents"></a><span class="type">void</span> QQuickItem::<span class="name">setFiltersChildMouseEvents</span>(<span class="type">bool</span> <i>filter</i>)</h3>
<p>Sets whether mouse and touch events of this item's children should be filtered through this item.</p>
<p>If <i>filter</i> is true, <a href="qquickitem.html#childMouseEventFilter">childMouseEventFilter</a>() will be called when a mouse event is triggered for a child item.</p>
<p><b>See also </b><a href="qquickitem.html#filtersChildMouseEvents">filtersChildMouseEvents</a>().</p>
<!-- @@@setFiltersChildMouseEvents -->
<!-- $$$setFlag[overload1]$$$setFlagFlagbool -->
<h3 class="fn" id="setFlag"><a name="setFlag"></a><span class="type">void</span> QQuickItem::<span class="name">setFlag</span>(<span class="type"><a href="qquickitem.html#Flag-enum">Flag</a></span> <i>flag</i>, <span class="type">bool</span> <i>enabled</i> = true)</h3>
<p>Enables the specified <i>flag</i> for this item if <i>enabled</i> is true; if <i>enabled</i> is false, the flag is disabled.</p>
<p>These provide various hints for the item; for example, the <a href="qquickitem.html#Flag-enum">ItemClipsChildrenToShape</a> flag indicates that all children of this item should be clipped to fit within the item area.</p>
<!-- @@@setFlag -->
<!-- $$$setFlags[overload1]$$$setFlagsFlags -->
<h3 class="fn" id="setFlags"><a name="setFlags"></a><span class="type">void</span> QQuickItem::<span class="name">setFlags</span>(<span class="type"><a href="qquickitem.html#Flag-enum">Flags</a></span> <i>flags</i>)</h3>
<p>Enables the specified <i>flags</i> for this item.</p>
<p><b>See also </b><a href="qquickitem.html#flags">flags</a>() and <a href="qquickitem.html#setFlag">setFlag</a>().</p>
<!-- @@@setFlags -->
<!-- $$$setKeepMouseGrab[overload1]$$$setKeepMouseGrabbool -->
<h3 class="fn" id="setKeepMouseGrab"><a name="setKeepMouseGrab"></a><span class="type">void</span> QQuickItem::<span class="name">setKeepMouseGrab</span>(<span class="type">bool</span> <i>keep</i>)</h3>
<p>Sets whether the mouse input should remain exclusively with this item.</p>
<p>This is useful for items that wish to grab and keep mouse interaction following a predefined gesture. For example, an item that is interested in horizontal mouse movement may set <a href="qquickitem.html#keepMouseGrab">keepMouseGrab</a> to true once a threshold has been exceeded. Once <a href="qquickitem.html#keepMouseGrab">keepMouseGrab</a> has been set to true, filtering items will not react to mouse events.</p>
<p>If <i>keep</i> is false, a filtering item may steal the grab. For example, <a href="qml-qtquick-flickable.html">Flickable</a> may attempt to steal a mouse grab if it detects that the user has begun to move the viewport.</p>
<p><b>See also </b><a href="qquickitem.html#keepMouseGrab">keepMouseGrab</a>().</p>
<!-- @@@setKeepMouseGrab -->
<!-- $$$setKeepTouchGrab[overload1]$$$setKeepTouchGrabbool -->
<h3 class="fn" id="setKeepTouchGrab"><a name="setKeepTouchGrab"></a><span class="type">void</span> QQuickItem::<span class="name">setKeepTouchGrab</span>(<span class="type">bool</span> <i>keep</i>)</h3>
<p>Sets whether the touch points grabbed by this item should remain exclusively with this item.</p>
<p>This is useful for items that wish to grab and keep specific touch points following a predefined gesture. For example, an item that is interested in horizontal touch point movement may set setKeepTouchGrab to true once a threshold has been exceeded. Once setKeepTouchGrab has been set to true, filtering items will not react to the relevant touch points.</p>
<p>If <i>keep</i> is false, a filtering item may steal the grab. For example, <a href="qml-qtquick-flickable.html">Flickable</a> may attempt to steal a touch point grab if it detects that the user has begun to move the viewport.</p>
<p><b>See also </b><a href="qquickitem.html#keepTouchGrab">keepTouchGrab</a>() and <a href="qquickitem.html#setKeepMouseGrab">setKeepMouseGrab</a>().</p>
<!-- @@@setKeepTouchGrab -->
<!-- $$$stackAfter[overload1]$$$stackAfterconstQQuickItem* -->
<h3 class="fn" id="stackAfter"><a name="stackAfter"></a><span class="type">void</span> QQuickItem::<span class="name">stackAfter</span>(const <span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *<i>sibling</i>)</h3>
<p>Moves the specified <i>sibling</i> item to the index after this item within the list of children. The order of children affects both the visual stacking order and tab focus navigation order.</p>
<p>Assuming the z values of both items are the same, this will cause <i>sibling</i> to be rendered below this item.</p>
<p>If both items have <a href="qquickitem.html#activeFocusOnTab-prop">activeFocusOnTab</a> set to <code>true</code>, this will also cause the tab focus order to change, with <i>sibling</i> receiving focus before this item.</p>
<p>The given <i>sibling</i> must be a sibling of this item; that is, they must have the same immediate <a href="qquickitem.html#parent-prop">parent</a>.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-visualparent.html">Concepts - Visual Parent in Qt Quick</a>.</p>
<!-- @@@stackAfter -->
<!-- $$$stackBefore[overload1]$$$stackBeforeconstQQuickItem* -->
<h3 class="fn" id="stackBefore"><a name="stackBefore"></a><span class="type">void</span> QQuickItem::<span class="name">stackBefore</span>(const <span class="type"><a href="qquickitem.html#QQuickItem">QQuickItem</a></span> *<i>sibling</i>)</h3>
<p>Moves the specified <i>sibling</i> item to the index before this item within the list of children. The order of children affects both the visual stacking order and tab focus navigation order.</p>
<p>Assuming the z values of both items are the same, this will cause <i>sibling</i> to be rendered above this item.</p>
<p>If both items have <a href="qquickitem.html#activeFocusOnTab-prop">activeFocusOnTab</a> set to <code>true</code>, this will also cause the tab focus order to change, with <i>sibling</i> receiving focus after this item.</p>
<p>The given <i>sibling</i> must be a sibling of this item; that is, they must have the same immediate <a href="qquickitem.html#parent-prop">parent</a>.</p>
<p><b>See also </b><a href="qtquick-visualcanvas-visualparent.html">Concepts - Visual Parent in Qt Quick</a>.</p>
<!-- @@@stackBefore -->
<!-- $$$textureProvider[overload1]$$$textureProvider -->
<h3 class="fn" id="textureProvider"><a name="textureProvider"></a><code>[virtual] </code><span class="type"><a href="qsgtextureprovider.html">QSGTextureProvider</a></span> *QQuickItem::<span class="name">textureProvider</span>() const</h3>
<p>Returns the texture provider for an item. The default implementation returns 0.</p>
<p>This function may only be called on the rendering thread.</p>
<!-- @@@textureProvider -->
<!-- $$$touchEvent[overload1]$$$touchEventQTouchEvent* -->
<h3 class="fn" id="touchEvent"><a name="touchEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">touchEvent</span>(<span class="type">QTouchEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive touch events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@touchEvent -->
<!-- $$$touchUngrabEvent[overload1]$$$touchUngrabEvent -->
<h3 class="fn" id="touchUngrabEvent"><a name="touchUngrabEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">touchUngrabEvent</span>()</h3>
<p>This event handler can be reimplemented in a subclass to be notified when a touch ungrab event has occurred on this item.</p>
<!-- @@@touchUngrabEvent -->
<!-- $$$ungrabMouse[overload1]$$$ungrabMouse -->
<h3 class="fn" id="ungrabMouse"><a name="ungrabMouse"></a><span class="type">void</span> QQuickItem::<span class="name">ungrabMouse</span>()</h3>
<p>Releases the mouse grab following a call to <a href="qquickitem.html#grabMouse">grabMouse</a>().</p>
<p>Note that this function should only be called when the item wants to stop handling further events. There is no need to call this function after a release or cancel event since no future events will be received in any case. No move or release events will be delivered after this function was called.</p>
<!-- @@@ungrabMouse -->
<!-- $$$ungrabTouchPoints[overload1]$$$ungrabTouchPoints -->
<h3 class="fn" id="ungrabTouchPoints"><a name="ungrabTouchPoints"></a><span class="type">void</span> QQuickItem::<span class="name">ungrabTouchPoints</span>()</h3>
<p>Ungrabs the touch points owned by this item.</p>
<p><b>Note: </b>there is hardly any reason to call this function. It should only be called when an item does not want to receive any further events, so no move or release events will be delivered after calling this function.</p><p><b>See also </b><a href="qquickitem.html#grabTouchPoints">grabTouchPoints</a>().</p>
<!-- @@@ungrabTouchPoints -->
<!-- $$$unsetCursor[overload1]$$$unsetCursor -->
<h3 class="fn" id="unsetCursor"><a name="unsetCursor"></a><span class="type">void</span> QQuickItem::<span class="name">unsetCursor</span>()</h3>
<p>Clears the cursor shape for this item.</p>
<p><b>See also </b><a href="qquickitem.html#cursor">cursor</a>() and <a href="qquickitem.html#setCursor">setCursor</a>().</p>
<!-- @@@unsetCursor -->
<!-- $$$update[overload1]$$$update -->
<h3 class="fn" id="update"><a name="update"></a><code>[slot] </code><span class="type">void</span> QQuickItem::<span class="name">update</span>()</h3>
<p>Schedules a call to <a href="qquickitem.html#updatePaintNode">updatePaintNode</a>() for this item.</p>
<p>The call to <a href="qquickitem.html#updatePaintNode">QQuickItem::updatePaintNode</a>() will always happen if the item is showing in a <a href="qquickwindow.html">QQuickWindow</a>.</p>
<p>Only items which specify <a href="qquickitem.html#Flag-enum">QQuickItem::ItemHasContents</a> are allowed to call QQuickItem::update().</p>
<!-- @@@update -->
<!-- $$$updateInputMethod[overload1]$$$updateInputMethodQt::InputMethodQueries -->
<h3 class="fn" id="updateInputMethod"><a name="updateInputMethod"></a><code>[protected] </code><span class="type">void</span> QQuickItem::<span class="name">updateInputMethod</span>(<span class="type">Qt::InputMethodQueries</span> <i>queries</i> = Qt::ImQueryInput)</h3>
<p>Notify input method on updated query values if needed. <i>queries</i> indicates the changed attributes.</p>
<!-- @@@updateInputMethod -->
<!-- $$$updatePaintNode[overload1]$$$updatePaintNodeQSGNode*UpdatePaintNodeData* -->
<h3 class="fn" id="updatePaintNode"><a name="updatePaintNode"></a><code>[virtual protected] </code><span class="type"><a href="qsgnode.html">QSGNode</a></span> *QQuickItem::<span class="name">updatePaintNode</span>(<span class="type"><a href="qsgnode.html">QSGNode</a></span> *<i>oldNode</i>, <span class="type"><a href="qquickitem-updatepaintnodedata.html">UpdatePaintNodeData</a></span> *<i>updatePaintNodeData</i>)</h3>
<p>Called on the render thread when it is time to sync the state of the item with the scene graph.</p>
<p>The function is called as a result of <a href="qquickitem.html#update">QQuickItem::update</a>(), if the user has set the <a href="qquickitem.html#Flag-enum">QQuickItem::ItemHasContents</a> flag on the item.</p>
<p>The function should return the root of the scene graph subtree for this item. Most implementations will return a single <a href="qsggeometrynode.html">QSGGeometryNode</a> containing the visual representation of this item. <i>oldNode</i> is the node that was returned the last time the function was called. <i>updatePaintNodeData</i> provides a pointer to the <a href="qsgtransformnode.html">QSGTransformNode</a> associated with this <a href="qquickitem.html">QQuickItem</a>.</p>
<pre class="cpp">

  <span class="type"><a href="qsgnode.html">QSGNode</a></span> <span class="operator">*</span>MyItem<span class="operator">::</span>updatePaintNode(<span class="type"><a href="qsgnode.html">QSGNode</a></span> <span class="operator">*</span>node<span class="operator">,</span> UpdatePaintNodeData <span class="operator">*</span>)
  {
      <span class="type"><a href="qsgsimplerectnode.html">QSGSimpleRectNode</a></span> <span class="operator">*</span>n <span class="operator">=</span> <span class="keyword">static_cast</span><span class="operator">&lt;</span><span class="type"><a href="qsgsimplerectnode.html">QSGSimpleRectNode</a></span> <span class="operator">*</span><span class="operator">&gt;</span>(node);
      <span class="keyword">if</span> (<span class="operator">!</span>n) {
          n <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qsgsimplerectnode.html">QSGSimpleRectNode</a></span>();
          n<span class="operator">-</span><span class="operator">&gt;</span>setColor(<span class="type">Qt</span><span class="operator">::</span>red);
      }
      n<span class="operator">-</span><span class="operator">&gt;</span>setRect(boundingRect());
      <span class="keyword">return</span> n;
  }

</pre>
<p>The main thread is blocked while this function is executed so it is safe to read values from the <a href="qquickitem.html">QQuickItem</a> instance and other objects in the main thread.</p>
<p>If no call to QQuickItem::updatePaintNode() result in actual scene graph changes, like <a href="qsgnode.html#markDirty">QSGNode::markDirty</a>() or adding and removing nodes, then the underlying implementation may decide to not render the scene again as the visual outcome is identical.</p>
<p><b>Warning:</b> It is crucial that OpenGL operations and interaction with the scene graph happens exclusively on the render thread, primarily during the QQuickItem::updatePaintNode() call. The best rule of thumb is to only use classes with the &quot;QSG&quot; prefix inside the QQuickItem::updatePaintNode() function.</p>
<p><b>Warning:</b> This function is called on the render thread. This means any QObjects or thread local storage that is created will have affinity to the render thread, so apply caution when doing anything other than rendering in this function. Similarly for signals, these will be emitted on the render thread and will thus often be delivered via queued connections.</p>
<p><b>Note: </b>All classes with QSG prefix should be used solely on the scene graph's rendering thread. See <a href="qtquick-visualcanvas-scenegraph.html#scene-graph-and-rendering">Scene Graph and Rendering</a> for more information.</p><p><b>See also </b><a href="qsgmaterial.html">QSGMaterial</a>, <a href="qsgsimplematerial.html">QSGSimpleMaterial</a>, <a href="qsggeometrynode.html">QSGGeometryNode</a>, <a href="qsggeometry.html">QSGGeometry</a>, <a href="qsgflatcolormaterial.html">QSGFlatColorMaterial</a>, <a href="qsgtexturematerial.html">QSGTextureMaterial</a>, <a href="qsgnode.html#markDirty">QSGNode::markDirty</a>(), and <a href="qquickitem.html#graphics-resource-handling">Graphics Resource Handling</a>.</p>
<!-- @@@updatePaintNode -->
<!-- $$$updatePolish[overload1]$$$updatePolish -->
<h3 class="fn" id="updatePolish"><a name="updatePolish"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">updatePolish</span>()</h3>
<p>This function should perform any layout as required for this item.</p>
<p>When <a href="qquickitem.html#polish">polish</a>() is called, the scene graph schedules a polish event for this item. When the scene graph is ready to render this item, it calls updatePolish() to do any item layout as required before it renders the next frame.</p>
<!-- @@@updatePolish -->
<!-- $$$wheelEvent[overload1]$$$wheelEventQWheelEvent* -->
<h3 class="fn" id="wheelEvent"><a name="wheelEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickItem::<span class="name">wheelEvent</span>(<span class="type">QWheelEvent</span> *<i>event</i>)</h3>
<p>This event handler can be reimplemented in a subclass to receive wheel events for an item. The event information is provided by the <i>event</i> parameter.</p>
<!-- @@@wheelEvent -->
<!-- $$$widthValid[overload1]$$$widthValid -->
<h3 class="fn" id="widthValid"><a name="widthValid"></a><code>[protected] </code><span class="type">bool</span> QQuickItem::<span class="name">widthValid</span>() const</h3>
<p>Returns whether the width property has been set explicitly.</p>
<!-- @@@widthValid -->
<!-- $$$window[overload1]$$$window -->
<h3 class="fn" id="window"><a name="window"></a><span class="type"><a href="qquickwindow.html">QQuickWindow</a></span> *QQuickItem::<span class="name">window</span>() const</h3>
<p>Returns the window in which this item is rendered.</p>
<p>The item does not have a window until it has been assigned into a scene. The <a href="qquickitem.html#windowChanged">windowChanged</a>() signal provides a notification both when the item is entered into a scene and when it is removed from a scene.</p>
<!-- @@@window -->
<!-- $$$windowChanged[overload1]$$$windowChangedQQuickWindow* -->
<h3 class="fn" id="windowChanged"><a name="windowChanged"></a><code>[signal] </code><span class="type">void</span> QQuickItem::<span class="name">windowChanged</span>(<span class="type"><a href="qquickwindow.html">QQuickWindow</a></span> *<i>window</i>)</h3>
<p>This signal is emitted when the item's <i>window</i> changes.</p>
<!-- @@@windowChanged -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 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>