Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 2cba8df17162abb32fcb8e6852f3eacc > files > 160

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" />
<!-- qqmlparserstatus.cpp -->
  <title>QQmlParserStatus Class | Qt QML 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="qtqml-index.html">Qt QML</a></td><td ><a href="qtqml-module.html">C++ Classes</a></td><td >QQmlParserStatus</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-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QQmlParserStatus Class</h1>
<!-- $$$QQmlParserStatus-brief -->
<p>The <a href="qqmlparserstatus.html">QQmlParserStatus</a> class provides updates on the QML parser state. <a href="#details">More...</a></p>
<!-- @@@QQmlParserStatus -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QQmlParserStatus&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += qml</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.0</td></tr></table></div><ul>
<li><a href="qqmlparserstatus-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qqmlparserstatus.html#classBegin">classBegin</a></b>() = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qqmlparserstatus.html#componentComplete">componentComplete</a></b>() = 0</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QQmlParserStatus-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qqmlparserstatus.html">QQmlParserStatus</a> class provides updates on the QML parser state.</p>
<p><a href="qqmlparserstatus.html">QQmlParserStatus</a> provides a mechanism for classes instantiated by a <a href="qqmlengine.html">QQmlEngine</a> to receive notification at key points in their creation.</p>
<p>This class is often used for optimization purposes, as it allows you to defer an expensive operation until after all the properties have been set on an object. For example, QML's Text element uses the parser status to defer text layout until all of its properties have been set (we don't want to layout when the <code>text</code> is assigned, and then relayout when the <code>font</code> is assigned, and relayout again when the <code>width</code> is assigned, and so on).</p>
<p>Be aware that <a href="qqmlparserstatus.html">QQmlParserStatus</a> methods are only called when a class is instantiated by a <a href="qqmlengine.html">QQmlEngine</a>. If you create the same class directly from C++, these methods will not be called automatically. To avoid this problem, it is recommended that you start deferring operations from <a href="qqmlparserstatus.html#classBegin">classBegin</a> instead of from the initial creation of your class. This will still prevent multiple revaluations during initial binding assignment in QML, but will not defer operations invoked from C++.</p>
<p>To use <a href="qqmlparserstatus.html">QQmlParserStatus</a>, you must inherit both a QObject-derived class and <a href="qqmlparserstatus.html">QQmlParserStatus</a>, and use the Q_INTERFACES() macro.</p>
<pre class="cpp">

  <span class="keyword">class</span> MyObject : <span class="keyword">public</span> <span class="type">QObject</span><span class="operator">,</span> <span class="keyword">public</span> <span class="type">QQmlParserStatus</span>
  {
      Q_OBJECT
      Q_INTERFACES(<span class="type">QQmlParserStatus</span>)

  <span class="keyword">public</span>:
      MyObject(<span class="type">QObject</span> <span class="operator">*</span>parent <span class="operator">=</span> <span class="number">0</span>);
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
      <span class="type">void</span> classBegin();
      <span class="type">void</span> componentComplete();
  }

</pre>
<p>The Qt Quick 1 version of this class is named QDeclarativeParserStatus.</p>
</div>
<!-- @@@QQmlParserStatus -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$classBegin[overload1]$$$classBegin -->
<h3 class="fn" id="classBegin"><a name="classBegin"></a><code>[pure virtual] </code><span class="type">void</span> QQmlParserStatus::<span class="name">classBegin</span>()</h3>
<p>Invoked after class creation, but before any properties have been set.</p>
<!-- @@@classBegin -->
<!-- $$$componentComplete[overload1]$$$componentComplete -->
<h3 class="fn" id="componentComplete"><a name="componentComplete"></a><code>[pure virtual] </code><span class="type">void</span> QQmlParserStatus::<span class="name">componentComplete</span>()</h3>
<p>Invoked after the root component that caused this instantiation has completed construction. At this point all static values and binding values have been assigned to the class.</p>
<!-- @@@componentComplete -->
</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>