Sophie

Sophie

distrib > Mageia > 6 > i586 > by-pkgid > 2cba8df17162abb32fcb8e6852f3eacc > files > 1150

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" />
<!-- cppextensionpoints.qdoc -->
  <title>C++ Extension Points Provided By Qt Quick | 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 >C++ Extension Points Provided By Qt Quick</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="#user-defined-qquickitem-derived-types">User-Defined QQuickItem-Derived Types</a></li>
<li class="level1"><a href="#scene-graph-related-classes">Scene Graph-Related Classes</a></li>
<li class="level1"><a href="#pixmap-and-threaded-image-support">Pixmap and Threaded Image Support</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">C++ Extension Points Provided By Qt Quick</h1>
<span class="subtitle"></span>
<!-- $$$qtquick-cppextensionpoints.html-description -->
<div class="descr"> <a name="details"></a>
<p>All QML applications can be extended from C++ in order to use additional functionality implemented in C++ code or to provide a C++ based QML plugin. This topic of extending QML from C++ is covered in the Integrating QML and C++ documentation.</p>
<p>Additionally, the Qt Quick module provides several extension and integration points for C++ developers, specific to this module. In particular, it allows C++ developers to create and register custom <a href="qquickitem.html">QQuickItem</a>-derived types which can be rendered by Qt Quick. It also provides several scene graph-related classes which allow developers to define their own rendering primitives.</p>
<a name="user-defined-qquickitem-derived-types"></a><a name="user-defined-qquickitem-derived-types"></a>
<h2 id="user-defined-qquickitem-derived-types">User-Defined QQuickItem-Derived Types</h2>
<p>While the Qt Quick module already provides a rich library of visual item types for use in a QML application, some developers may wish to define their own item-derived types in C++ and expose them to the QML type system. The easiest way to do this is to subclass <a href="qquickitem.html">QQuickItem</a>, which is the base type for all visual types in the Qt Quick module. See the <a href="qquickitem.html">QQuickItem</a> documentation for more details.</p>
<a name="scene-graph-related-classes"></a><a name="scene-graph-related-classes"></a>
<h2 id="scene-graph-related-classes">Scene Graph-Related Classes</h2>
<p>Qt Quick 2 makes use of a dedicated scene graph based on OpenGL ES 2.0 or OpenGL 2.0 for its rendering. Using a scene graph for graphics rather than the traditional imperative painting systems (QPainter and similar), means the scene to be rendered can be retained between frames and the complete set of primitives to render is known before rendering starts. This opens up for a number of optimizations, such as batching the OpenGL draw calls to minimize state changes or discarding obscured primitives.</p>
<p>The <a href="qtquick-module.html">Qt Quick C++ API</a> provides various classes to enable custom nodes to be created in C++.</p>
<p>See the <a href="qtquick-visualcanvas-scenegraph.html">Qt Quick Scene Graph</a> documentation for details.</p>
<a name="pixmap-and-threaded-image-support"></a><a name="pixmap-and-threaded-image-support"></a>
<h2 id="pixmap-and-threaded-image-support">Pixmap and Threaded Image Support</h2>
<p>While the QML engine allows QML application to load images from filesystem or network resources, some applications may require the additional option of loading images from C++ based processes. This can be implemented through the <a href="qquickimageprovider.html">QQuickImageProvider</a> class, which provides support for pixmap loading and threaded image requests for QML applications. Any QML application that requests an image through the special &quot;image:&quot; URL scheme will be directed to an appropriate image provider to load the image.</p>
<p>For more information, see the <a href="qquickimageprovider.html">QQuickImageProvider</a> documentation.</p>
</div>
<!-- @@@qtquick-cppextensionpoints.html -->
        </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>