Sophie

Sophie

distrib > Mageia > 6 > armv7hl > by-pkgid > 749fcc421771b410525f39bd88a5732d > files > 57

qttools5-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" />
<!-- examples.qdoc -->
  <title>QML Documentation Example | QDoc Manual 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="qdoc-index.html">QDoc Manual</a></td><td >QML Documentation Example</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="#qml-class">QML Class</a></li>
<li class="level1"><a href="#properties-signals-handlers-and-methods">Properties, Signals, Handlers, and Methods</a></li>
<li class="level2"><a href="#internal-documentation">Internal Documentation</a></li>
<li class="level1"><a href="#qml-types-with-c-implementation">QML Types with C++ Implementation</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QML Documentation Example</h1>
<span class="subtitle"></span>
<!-- $$$componentset-description -->
<div class="descr"> <a name="details"></a>
<p>This example demonstrates one of the ways to document QML types.</p>
<p>In particular, there are sample types that are documented with QDoc commands comments. There are documentation comments for the QML types and their public interfaces. The types are grouped into a module, the <a href="uicomponents-qmlmodule.html">UI Components</a> module.</p>
<p>The <a href="qdoc-componentset-uicomponents-qdoc-sample.html">uicomponents.qdoc</a> file generates the overview page for the <a href="uicomponents-qmlmodule.html">UI Components</a> module page.</p>
<p>The generated documentation is available in the <a href="uicomponents-qmlmodule.html">UI Components</a> module.</p>
<a name="qml-class"></a>
<h2 id="qml-class">QML Class</h2>
<p>The QML types use the <a href="13-qdoc-commands-topics.html#qmltype-command">\qmltype</a> to document the type. In addition, they have the <a href="19-qdoc-commands-grouping.html#inmodule-command">\inmodule</a> command in order for QDoc to associate them to the <code>UIComponents</code> module.</p>
<p>QDoc uses the <a href="11-qdoc-commands-specialcontent.html#brief-command">\brief</a> command to place a basic description when listing the types.</p>
<a name="properties-signals-handlers-and-methods"></a>
<h2 id="properties-signals-handlers-and-methods">Properties, Signals, Handlers, and Methods</h2>
<p>The types have their properties, signals, handlers, and methods defined in their respective QML files. QDoc associates the properties and methods to the types, therefore, you only need to place the documentation above the property, method, or signal.</p>
<p>To document the type of a <i>property alias</i>, you must use the <a href="13-qdoc-commands-topics.html#qmlproperty-command">\qmlproperty</a> command to specify the data type.</p>
<pre class="cpp">

  \qmlproperty <span class="type">int</span> anAliasedProperty
  An aliased property of type <span class="type">int</span><span class="operator">.</span>

</pre>
<a name="internal-documentation"></a>
<h3 >Internal Documentation</h3>
<p>You may declare that a documentation is for internal use by placing the <a href="16-qdoc-commands-status.html#internal-command">\internal</a> command after the beginning QDoc comment <code>/*</code>. QDoc will prevent the internal documentation from appearing in the public API.</p>
<p>If you wish to omit certain parts of the documentation, you may use the <a href="12-0-qdoc-commands-miscellaneous.html#omit-command">\omit</a> and <a href="12-0-qdoc-commands-miscellaneous.html#omit-command">\endomit</a> command.</p>
<a name="qml-types-with-c-implementation"></a>
<h2 id="qml-types-with-c-implementation">QML Types with C++ Implementation</h2>
<p>This example only demonstrates the documentation for types in QML files, but the regular <a href="qdoc-categories.html">QML commands</a> may be placed inside C++ classes to define the public API of the QML type.</p>
<p>Files:</p>
<ul>
<li><a href="qdoc-componentset-progressbar-qml.html">componentset/ProgressBar.qml</a></li>
<li><a href="qdoc-componentset-switch-qml.html">componentset/Switch.qml</a></li>
<li><a href="qdoc-componentset-tabwidget-qml.html">componentset/TabWidget.qml</a></li>
<li><a href="qdoc-componentset-uicomponents-qdoc-sample.html">componentset/uicomponents.qdoc.sample</a></li>
<li><a href="qdoc-componentset-componentset-pro.html">componentset/componentset.pro</a></li>
</ul>
</div>
<!-- @@@componentset -->
        </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>