Sophie

Sophie

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

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" />
<!-- qquickswipeview.cpp -->
  <title>SwipeView 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 >SwipeView 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="#attached-properties">Attached Properties</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">SwipeView QML Type</h1>
<span class="subtitle"></span>
<!-- $$$SwipeView-brief -->
<p>A swipe view control. <a href="#details">More...</a></p>
<!-- @@@SwipeView -->
<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-container.html">Container</a></p>
</td></tr></table></div><ul>
<li><a href="qml-qt-labs-controls-swipeview-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="attached-properties"></a>
<h2 id="attached-properties">Attached Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qt-labs-controls-swipeview.html#index-attached-prop">index</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-swipeview.html#isCurrentItem-attached-prop">isCurrentItem</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-swipeview.html#view-attached-prop">view</a></b></b> : SwipeView</li>
</ul>
<!-- $$$SwipeView-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p><a href="qml-qt-labs-controls-swipeview.html">SwipeView</a> provides a swipe-based navigation model.</p>
<p class="centerAlign"><img src="images/qtlabscontrols-swipeview-wireframe.png" alt="" /></p><p><a href="qml-qt-labs-controls-swipeview.html">SwipeView</a> is populated with a set of pages. One page is visible at a time. The user can navigate between the pages by swiping sideways. Notice that <a href="qml-qt-labs-controls-swipeview.html">SwipeView</a> itself is entirely non-visual. It is recommended to combine it with <a href="qml-qt-labs-controls-pageindicator.html">PageIndicator</a>, to give the user a visual clue that there are multiple pages.</p>
<pre class="qml">

  <span class="type"><a href="qml-qt-labs-controls-swipeview.html">SwipeView</a></span> {
      <span class="name">id</span>: <span class="name">view</span>

      <span class="name">currentIndex</span>: <span class="number">1</span>
      <span class="name">anchors</span>.fill: <span class="name">parent</span>

      <span class="type">Item</span> {
          <span class="name">id</span>: <span class="name">firstPage</span>
      }
      <span class="type">Item</span> {
          <span class="name">id</span>: <span class="name">secondPage</span>
      }
      <span class="type">Item</span> {
          <span class="name">id</span>: <span class="name">thirdPage</span>
      }
  }

  <span class="type"><a href="qml-qt-labs-controls-pageindicator.html">PageIndicator</a></span> {
      <span class="name">id</span>: <span class="name">indicator</span>

      <span class="name">count</span>: <span class="name">view</span>.<span class="name">count</span>
      <span class="name">currentIndex</span>: <span class="name">view</span>.<span class="name">currentIndex</span>

      <span class="name">anchors</span>.bottom: <span class="name">view</span>.<span class="name">bottom</span>
      <span class="name">anchors</span>.horizontalCenter: <span class="name">parent</span>.<span class="name">horizontalCenter</span>
  }

</pre>
<p>As shown above, <a href="qml-qt-labs-controls-swipeview.html">SwipeView</a> is typically populated with a static set of pages that are defined inline as children of the view. It is also possible to <a href="qml-qt-labs-controls-container.html#addItem-method">add</a>, <a href="qml-qt-labs-controls-container.html#insertItem-method">insert</a>, <a href="qml-qt-labs-controls-container.html#moveItem-method">move</a>, and <a href="qml-qt-labs-controls-container.html#removeItem-method">remove</a> pages dynamically at run time.</p>
<p><b>Note: </b><a href="qml-qt-labs-controls-swipeview.html">SwipeView</a> takes over the geometry management of items added to the view. Using anchors on the items is not supported, and any <code>width</code> or <code>height</code> assignment will be overridden by the view. Notice that this only applies to the root of the item. Specifying width and height, or using anchors for its children works as expected.</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="qml-qt-labs-controls-tabbar.html">TabBar</a>, <a href="qml-qt-labs-controls-pageindicator.html">PageIndicator</a>, <a href="qtlabscontrols-customize.html#customizing-swipeview">Customizing SwipeView</a>, <a href="qtlabscontrols-navigation.html">Navigation Controls</a>, and <a href="qtlabscontrols-containers.html">Container Controls</a>.</p>
<!-- @@@SwipeView -->
<h2>Attached Property Documentation</h2>
<!-- $$$index -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="index-attached-prop">
<td class="tblQmlPropNode"><p>
<a name="index-attached-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">SwipeView.index</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This attached property holds the index of each child item in the <a href="qml-qt-labs-controls-swipeview.html">SwipeView</a>.</p>
<p>It is attached to each child item of the <a href="qml-qt-labs-controls-swipeview.html">SwipeView</a>.</p>
</div></div><!-- @@@index -->
<br/>
<!-- $$$isCurrentItem -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="isCurrentItem-attached-prop">
<td class="tblQmlPropNode"><p>
<a name="isCurrentItem-attached-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">SwipeView.isCurrentItem</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This attached property is <code>true</code> if this child is the current item.</p>
<p>It is attached to each child item of the <a href="qml-qt-labs-controls-swipeview.html">SwipeView</a>.</p>
</div></div><!-- @@@isCurrentItem -->
<br/>
<!-- $$$view -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="view-attached-prop">
<td class="tblQmlPropNode"><p>
<a name="view-attached-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">SwipeView.view</span> : <span class="type"><a href="qml-qt-labs-controls-swipeview.html">SwipeView</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This attached property holds the view that manages this child item.</p>
<p>It is attached to each child item of the <a href="qml-qt-labs-controls-swipeview.html">SwipeView</a>.</p>
</div></div><!-- @@@view -->
<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>