Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > c936229ef0138f42857f36beadbeda30 > files > 158

qt3d5-doc-5.12.2-2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- quick3dnodeinstantiator.cpp -->
  <title>NodeInstantiator QML Type | Qt 3D 5.12.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qt3d-index.html">Qt 3D</a></td><td ><a href="qt3d-qml.html">QML Types</a></td><td >NodeInstantiator QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qt3d-index.html">Qt 5.12.2 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#methods">Methods</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">NodeInstantiator QML Type</h1>
<span class="subtitle"></span>
<!-- $$$NodeInstantiator-brief -->
<p>Dynamically creates nodes. <a href="#details">More...</a></p>
<!-- @@@NodeInstantiator -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import Qt3D.Core 2.12</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.5</td></tr></table></div><ul>
<li><a href="qml-qt3d-core-nodeinstantiator-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qt3d-core-nodeinstantiator.html#active-prop">active</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qt3d-core-nodeinstantiator.html#asynchronous-prop">asynchronous</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qt3d-core-nodeinstantiator.html#count-prop">count</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qt3d-core-nodeinstantiator.html#delegate-prop">delegate</a></b></b> : QtQml::Component</li>
<li class="fn"><b><b><a href="qml-qt3d-core-nodeinstantiator.html#model-prop">model</a></b></b> : variant</li>
<li class="fn"><b><b><a href="qml-qt3d-core-nodeinstantiator.html#object-prop">object</a></b></b> : QtQml::QtObject</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qt3d-core-nodeinstantiator.html#objectAdded-signal">objectAdded</a></b></b>(int <i>index</i>,  QtObject <i>object</i>)</li>
<li class="fn"><b><b><a href="qml-qt3d-core-nodeinstantiator.html#objectRemoved-signal">objectRemoved</a></b></b>(int <i>index</i>,  QtObject <i>object</i>)</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn">QtQml::QtObject <b><b><a href="qml-qt3d-core-nodeinstantiator.html#objectAt-method">objectAt</a></b></b>(int <i>index</i>)</li>
</ul>
<!-- $$$NodeInstantiator-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>A <a href="qml-qt3d-core-nodeinstantiator.html">NodeInstantiator</a> can be used to control the dynamic creation of nodes, or to dynamically create multiple objects from a template.</p>
<p>The <a href="qml-qt3d-core-nodeinstantiator.html">NodeInstantiator</a> element will manage the objects it creates. Those objects are parented to the Instantiator and can also be deleted by the <a href="qml-qt3d-core-nodeinstantiator.html">NodeInstantiator</a> if the <a href="qml-qt3d-core-nodeinstantiator.html">NodeInstantiator</a>'s properties change. Nodes can also be destroyed dynamically through other means, and the <a href="qml-qt3d-core-nodeinstantiator.html">NodeInstantiator</a> will not recreate them unless the properties of the <a href="qml-qt3d-core-nodeinstantiator.html">NodeInstantiator</a> change.</p>
<!-- @@@NodeInstantiator -->
<h2>Property Documentation</h2>
<!-- $$$active -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="active-prop">
<td class="tblQmlPropNode"><p>
<a name="active-prop"></a><span class="name">active</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>When active is <code>true</code>, and the delegate component is ready, the Instantiator will create objects according to the model. When active is <code>false</code>, no objects will be created and any previously created objects will be destroyed.</p>
<p>Default is <code>true</code>.</p>
</div></div><!-- @@@active -->
<br/>
<!-- $$$asynchronous -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="asynchronous-prop">
<td class="tblQmlPropNode"><p>
<a name="asynchronous-prop"></a><span class="name">asynchronous</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>When asynchronous is true the Instantiator will attempt to create objects asynchronously. This means that objects may not be available immediately, even if active is set to true.</p>
<p>You can use the <a href="qml-qt3d-core-nodeinstantiator.html#objectAdded-signal">objectAdded</a> signal to respond to items being created.</p>
<p>Default is <code>false</code>.</p>
</div></div><!-- @@@asynchronous -->
<br/>
<!-- $$$count -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="count-prop">
<td class="tblQmlPropNode"><p>
<a name="count-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">count</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The number of objects the Instantiator is currently managing.</p>
</div></div><!-- @@@count -->
<br/>
<!-- $$$delegate -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="delegate-prop">
<td class="tblQmlPropNode"><p>
<a name="delegate-prop"></a><span class="qmldefault">[default] </span><span class="name">delegate</span> : <span class="type">QtQml::Component</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The component used to create all objects.</p>
<p>Note that an extra variable, index, will be available inside instances of the delegate. This variable refers to the index of the instance inside the Instantiator, and can be used to obtain the object through the itemAt method of the Instantiator.</p>
<p>If this property is changed, all instances using the old delegate will be destroyed and new instances will be created using the new delegate.</p>
</div></div><!-- @@@delegate -->
<br/>
<!-- $$$model -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="model-prop">
<td class="tblQmlPropNode"><p>
<a name="model-prop"></a><span class="name">model</span> : <span class="type">variant</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property can be set to any of the supported data models:</p>
<ul>
<li>A number that indicates the number of delegates to be created by the repeater</li>
<li>A model (for example, a ListModel item or a QAbstractItemModel subclass)</li>
<li>A string list</li>
<li>An object list</li>
</ul>
<p>The type of model affects the properties that are exposed to the <a href="qml-qt3d-core-nodeinstantiator.html#delegate-prop">delegate</a>.</p>
<p>Default value is 1, which creates a single delegate instance.</p>
<p><b>See also </b>Data Models.</p>
</div></div><!-- @@@model -->
<br/>
<!-- $$$object -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="object-prop">
<td class="tblQmlPropNode"><p>
<a name="object-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">object</span> : <span class="type">QtQml::QtObject</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This is a reference to the first created object, intended as a convenience for the case where only one object has been created.</p>
</div></div><!-- @@@object -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$objectAdded -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="objectAdded-signal">
<td class="tblQmlFuncNode"><p>
<a name="objectAdded-signal"></a><span class="name">objectAdded</span>(<span class="type">int</span> <i>index</i>,  <span class="type">QtObject</span> <i>object</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when a node is added to the <a href="qml-qt3d-core-nodeinstantiator.html">NodeInstantiator</a>. The <i>index</i> parameter holds the index which the node has been given, and the <i>object</i> parameter holds the <a href="qml-qt3d-core-node.html">Node</a> that has been added.</p>
<p>The corresponding handler is <code>onNodeAdded</code>.</p>
</div></div><!-- @@@objectAdded -->
<br/>
<!-- $$$objectRemoved -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="objectRemoved-signal">
<td class="tblQmlFuncNode"><p>
<a name="objectRemoved-signal"></a><span class="name">objectRemoved</span>(<span class="type">int</span> <i>index</i>,  <span class="type">QtObject</span> <i>object</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when an object is removed from the Instantiator. The <i>index</i> parameter holds the index which the object had been given, and the <i>object</i> parameter holds the QtObject that has been removed.</p>
<p>Do not keep a reference to <i>object</i> if it was created by this Instantiator, as in these cases it will be deleted shortly after the signal is handled.</p>
<p>The corresponding handler is <code>onObjectRemoved</code>.</p>
</div></div><!-- @@@objectRemoved -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$objectAt -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="objectAt-method">
<td class="tblQmlFuncNode"><p>
<a name="objectAt-method"></a><span class="type">QtQml::QtObject</span> <span class="name">objectAt</span>(<span class="type">int</span> <i>index</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Returns a reference to the object with the given <i>index</i>.</p>
</div></div><!-- @@@objectAt -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>