Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 886c2ed147b4d6954d2d9fb23759f3ff > files > 263

qtquickcontrols25-doc-5.6.2-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" />
<!-- qquicktumbler.cpp -->
  <title>Tumbler QML Type | Qt Labs Controls 5.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    window.onload = function(){document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");};
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.6</td><td ><a href="qtlabscontrols-index.html">Qt Labs Controls</a></td><td ><a href="qt-labs-controls-qmlmodule.html">QML Types</a></td><td >Tumbler QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.6.2 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="#properties">Properties</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#non-wrapping-tumbler">Non-wrapping Tumbler</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Tumbler QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Tumbler-brief -->
<p>A spinnable wheel of items that can be selected. <a href="#details">More...</a></p>
<!-- @@@Tumbler -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import Qt.labs.controls 1.0</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qt-labs-controls-control.html">Control</a></p>
</td></tr></table></div><ul>
<li><a href="qml-qt-labs-controls-tumbler-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-qt-labs-controls-tumbler.html#count-prop">count</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-tumbler.html#currentIndex-prop">currentIndex</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-tumbler.html#currentItem-prop">currentItem</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-tumbler.html#delegate-prop">delegate</a></b></b> : component</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-tumbler.html#model-prop">model</a></b></b> : variant</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-tumbler.html#visibleItemCount-prop">visibleItemCount</a></b></b> : int</li>
</ul>
<!-- $$$Tumbler-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<pre class="cpp">

  Tumbler {
      model: <span class="number">5</span>
      <span class="comment">// ...</span>
  }

</pre>
<a name="non-wrapping-tumbler"></a>
<h2 id="non-wrapping-tumbler">Non-wrapping Tumbler</h2>
<p>The default contentItem of Tumbler is a PathView, which wraps when it reaches the top and bottom. To achieve a non-wrapping Tumbler, use ListView as the contentItem:</p>
<pre class="qml">

  <span class="type"><a href="qml-qt-labs-controls-tumbler.html">Tumbler</a></span> {
      <span class="name">id</span>: <span class="name">listViewTumbler</span>

      <span class="name">contentItem</span>: <span class="name">ListView</span> {
          <span class="name">anchors</span>.fill: <span class="name">parent</span>
          <span class="name">model</span>: <span class="name">listViewTumbler</span>.<span class="name">model</span>
          <span class="name">delegate</span>: <span class="name">listViewTumbler</span>.<span class="name">delegate</span>

          <span class="name">snapMode</span>: <span class="name">ListView</span>.<span class="name">SnapToItem</span>
          <span class="name">highlightRangeMode</span>: <span class="name">ListView</span>.<span class="name">StrictlyEnforceRange</span>
          <span class="name">preferredHighlightBegin</span>: <span class="name">height</span> <span class="operator">/</span> <span class="number">2</span> <span class="operator">-</span> (<span class="name">height</span> <span class="operator">/</span> <span class="name">listViewTumbler</span>.<span class="name">visibleItemCount</span> <span class="operator">/</span> <span class="number">2</span>)
          <span class="name">preferredHighlightEnd</span>: <span class="name">height</span> <span class="operator">/</span> <span class="number">2</span>  <span class="operator">+</span> (<span class="name">height</span> <span class="operator">/</span> <span class="name">listViewTumbler</span>.<span class="name">visibleItemCount</span> <span class="operator">/</span> <span class="number">2</span>)
          <span class="name">clip</span>: <span class="number">true</span>
      }
  }

</pre>
<p class="centerAlign"><img src="images/qtlabscontrols-tumbler-wrap.gif" alt="" /></p><p><b>Note: </b><i>Types in the Qt.labs module are not guaranteed to remain compatible in future versions.</i></p><p><b>See also </b><a href="qtlabscontrols-customize.html#customizing-tumbler">Customizing Tumbler</a> and <a href="qtlabscontrols-input.html">Input Controls</a>.</p>
<!-- @@@Tumbler -->
<h2>Property Documentation</h2>
<!-- $$$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>This property holds the number of items in the model.</p>
</div></div><!-- @@@count -->
<br/>
<!-- $$$currentIndex -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="currentIndex-prop">
<td class="tblQmlPropNode"><p>
<a name="currentIndex-prop"></a><span class="name">currentIndex</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the index of the current item.</p>
</div></div><!-- @@@currentIndex -->
<br/>
<!-- $$$currentItem -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="currentItem-prop">
<td class="tblQmlPropNode"><p>
<a name="currentItem-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">currentItem</span> : <span class="type">Item</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the item at the current index.</p>
</div></div><!-- @@@currentItem -->
<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="name">delegate</span> : <span class="type">component</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the delegate used to display each item.</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 holds the model that provides data for this tumbler.</p>
</div></div><!-- @@@model -->
<br/>
<!-- $$$visibleItemCount -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="visibleItemCount-prop">
<td class="tblQmlPropNode"><p>
<a name="visibleItemCount-prop"></a><span class="name">visibleItemCount</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the number of items visible in the tumbler. It must be an odd number, as the current item is always vertically centered.</p>
</div></div><!-- @@@visibleItemCount -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2016 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>