Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates > by-pkgid > 6e2327ca1c896c6d674ae53117299f21 > files > 1088

qtdeclarative5-doc-5.12.6-1.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" />
<!-- qquickpathview.cpp -->
  <title>PathView QML Type | Qt Quick 5.12.6</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="qtquick-index.html">Qt Quick</a></td><td ><a href="qtquick-qmlmodule.html">QML Types</a></td><td >PathView QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtquick-index.html">Qt 5.12.6 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="#attached-properties">Attached 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">PathView QML Type</h1>
<span class="subtitle"></span>
<!-- $$$PathView-brief -->
<p>Lays out model-provided items on a path. <a href="#details">More...</a></p>
<!-- @@@PathView -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtQuick 2.12</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qtquick-item.html">Item</a></p>
</td></tr></table></div><ul>
<li><a href="qml-qtquick-pathview-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-qtquick-pathview.html#cacheItemCount-prop">cacheItemCount</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#count-prop">count</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#currentIndex-prop">currentIndex</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#currentItem-prop">currentItem</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#delegate-prop">delegate</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#dragMargin-prop">dragMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#dragging-prop">dragging</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#flickDeceleration-prop">flickDeceleration</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#flicking-prop">flicking</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#highlight-prop">highlight</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#highlightItem-prop">highlightItem</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#highlightMoveDuration-prop">highlightMoveDuration</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#highlightRangeMode-prop">highlightRangeMode</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#interactive-prop">interactive</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#maximumFlickVelocity-prop">maximumFlickVelocity</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#model-prop">model</a></b></b> : model</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#movementDirection-prop">movementDirection</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#moving-prop">moving</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#offset-prop">offset</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#path-prop">path</a></b></b> : Path</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#pathItemCount-prop">pathItemCount</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#preferredHighlightBegin-prop">preferredHighlightBegin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#preferredHighlightEnd-prop">preferredHighlightEnd</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#snapMode-prop">snapMode</a></b></b> : enumeration</li>
</ul>
<a name="attached-properties"></a>
<h2 id="attached-properties">Attached Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#isCurrentItem-attached-prop">isCurrentItem</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#onPath-attached-prop">onPath</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#view-attached-prop">view</a></b></b> : PathView</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#dragEnded-signal">dragEnded</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#dragStarted-signal">dragStarted</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#flickEnded-signal">flickEnded</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#flickStarted-signal">flickStarted</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#movementEnded-signal">movementEnded</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#movementStarted-signal">movementStarted</a></b></b>()</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#decrementCurrentIndex-method">decrementCurrentIndex</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#incrementCurrentIndex-method">incrementCurrentIndex</a></b></b>()</li>
<li class="fn">int <b><b><a href="qml-qtquick-pathview.html#indexAt-method">indexAt</a></b></b>(real <i>x</i>,  real <i>y</i>)</li>
<li class="fn">Item <b><b><a href="qml-qtquick-pathview.html#itemAt-method">itemAt</a></b></b>(real <i>x</i>,  real <i>y</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-pathview.html#positionViewAtIndex-method">positionViewAtIndex</a></b></b>(int <i>index</i>,  PositionMode <i>mode</i>)</li>
</ul>
<!-- $$$PathView-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>A <a href="qml-qtquick-pathview.html">PathView</a> displays data from models created from built-in QML types like ListModel and XmlListModel, or custom model classes defined in C++ that inherit from QAbstractListModel.</p>
<p>The view has a <a href="qml-qtquick-pathview.html#model-prop">model</a>, which defines the data to be displayed, and a <a href="qml-qtquick-pathview.html#delegate-prop">delegate</a>, which defines how the data should be displayed. The <a href="qml-qtquick-pathview.html#delegate-prop">delegate</a> is instantiated for each item on the <a href="qml-qtquick-pathview.html#path-prop">path</a>. The items may be flicked to move them along the path.</p>
<p>For example, if there is a simple list model defined in a file <code>ContactModel.qml</code> like this:</p>
<pre class="qml">

  import QtQuick 2.0

  ListModel {
      ListElement {
          name: "Bill Jones"
          icon: "pics/qtlogo.png"
      }
      ListElement {
          name: "Jane Doe"
          icon: "pics/qtlogo.png"
      }
      ListElement {
          name: "John Smith"
          icon: "pics/qtlogo.png"
      }
  }

</pre>
<p>This data can be represented as a <a href="qml-qtquick-pathview.html">PathView</a>, like this:</p>
<pre class="qml">

  import QtQuick 2.0

  Rectangle {
      width: 240; height: 200

      Component {
          id: delegate
          Column {
              id: wrapper
              opacity: PathView.isCurrentItem ? 1 : 0.5
              Image {
                  anchors.horizontalCenter: nameText.horizontalCenter
                  width: 64; height: 64
                  source: icon
              }
              Text {
                  id: nameText
                  text: name
                  font.pointSize: 16
              }
          }
      }

      PathView {
          anchors.fill: parent
          model: ContactModel {}
          delegate: delegate
          path: Path {
              startX: 120; startY: 100
              PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 }
              PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 }
          }
      }
  }

</pre>
<p class="centerAlign"><img src="images/pathview.gif" alt="" /></p><p>(Note the above example uses <a href="qml-qtquick-pathattribute.html">PathAttribute</a> to scale and modify the opacity of the items as they rotate. This additional code can be seen in the <a href="qml-qtquick-pathattribute.html">PathAttribute</a> documentation.)</p>
<p><a href="qml-qtquick-pathview.html">PathView</a> does not automatically handle keyboard navigation. This is because the keys to use for navigation will depend upon the shape of the path. Navigation can be added quite simply by setting <code>focus</code> to <code>true</code> and calling <a href="qml-qtquick-pathview.html#decrementCurrentIndex-method">decrementCurrentIndex()</a> or <a href="qml-qtquick-pathview.html#incrementCurrentIndex-method">incrementCurrentIndex()</a>, for example to navigate using the left and right arrow keys:</p>
<pre class="qml">



</pre>
<p>The path view itself is a focus scope (see <a href="qtquick-input-focus.html">Keyboard Focus in Qt Quick</a> for more details).</p>
<p>Delegates are instantiated as needed and may be destroyed at any time. State should <i>never</i> be stored in a delegate.</p>
<p><a href="qml-qtquick-pathview.html">PathView</a> attaches a number of properties to the root item of the delegate, for example <code>PathView.isCurrentItem</code>. In the following example, the root delegate item can access this attached property directly as <code>PathView.isCurrentItem</code>, while the child <code>nameText</code> object must refer to this property as <code>wrapper.PathView.isCurrentItem</code>.</p>
<pre class="qml">

      Component {
          id: delegate
          Column {
              id: wrapper
              opacity: PathView.isCurrentItem ? 1 : 0.5
              Image {
                  anchors.horizontalCenter: nameText.horizontalCenter
                  width: 64; height: 64
                  source: icon
              }
              Text {
                  id: nameText
                  text: name
                  font.pointSize: 16
              }
          }
      }

</pre>
<p><b>Note</b> that views do not enable <i>clip</i> automatically. If the view is not clipped by another item or the screen, it will be necessary to set <i>clip: true</i> in order to have the out of view items clipped nicely.</p>
<p><b>See also </b><a href="qml-qtquick-path.html">Path</a>, <a href="qtquick-modelviewsdata-modelview.html#qml-data-models">QML Data Models</a>, <a href="qml-qtquick-listview.html">ListView</a>, <a href="qml-qtquick-gridview.html">GridView</a>, and <a href="qtquick-views-example.html">Qt Quick Examples - Views</a>.</p>
<!-- @@@PathView -->
<h2>Property Documentation</h2>
<!-- $$$cacheItemCount -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="cacheItemCount-prop">
<td class="tblQmlPropNode"><p>
<a name="cacheItemCount-prop"></a><span class="name">cacheItemCount</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the maximum number of items to cache off the path.</p>
<p>For example, a <a href="qml-qtquick-pathview.html">PathView</a> with a model containing 20 items, a <a href="qml-qtquick-pathview.html#pathItemCount-prop">pathItemCount</a> of 10, and an cacheItemCount of 4 will create up to 14 items, with 10 visible on the path and 4 invisible cached items.</p>
<p>The cached delegates are created asynchronously, allowing creation to occur across multiple frames and reducing the likelihood of skipping frames.</p>
<p><b>Note: </b>Setting this property is not a replacement for creating efficient delegates. It can improve the smoothness of scrolling behavior at the expense of additional memory usage. The fewer objects and bindings in a delegate, the faster a view can be scrolled. It is important to realize that setting cacheItemCount will only postpone issues caused by slow-loading delegates, it is not a solution for this scenario.</p><p><b>See also </b><a href="qml-qtquick-pathview.html#pathItemCount-prop">pathItemCount</a>.</p>
</div></div><!-- @@@cacheItemCount -->
<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="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="name">currentItem</span> : <span class="type"><a href="qml-qtquick-item.html">Item</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the current item in the view.</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>The delegate provides a template defining each item instantiated by the view. The index is exposed as an accessible <code>index</code> property. Properties of the model are also available depending upon the type of <a href="qtquick-modelviewsdata-modelview.html#qml-data-models">Data Model</a>.</p>
<p>The number of objects and bindings in the delegate has a direct effect on the flicking performance of the view when <a href="qml-qtquick-pathview.html#pathItemCount-prop">pathItemCount</a> is specified. If at all possible, place functionality that is not needed for the normal display of the delegate in a <a href="qml-qtquick-loader.html">Loader</a> which can load additional components when needed.</p>
<p>Note that the <a href="qml-qtquick-pathview.html">PathView</a> will layout the items based on the size of the root item in the delegate.</p>
<p>Here is an example delegate:</p>
<pre class="qml">

      Component {
          id: delegate
          Column {
              id: wrapper
              opacity: PathView.isCurrentItem ? 1 : 0.5
              Image {
                  anchors.horizontalCenter: nameText.horizontalCenter
                  width: 64; height: 64
                  source: icon
              }
              Text {
                  id: nameText
                  text: name
                  font.pointSize: 16
              }
          }
      }

</pre>
</div></div><!-- @@@delegate -->
<br/>
<!-- $$$dragMargin -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="dragMargin-prop">
<td class="tblQmlPropNode"><p>
<a name="dragMargin-prop"></a><span class="name">dragMargin</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the maximum distance from the path that initiates mouse dragging.</p>
<p>By default the path can only be dragged by clicking on an item. If dragMargin is greater than zero, a drag can be initiated by clicking within dragMargin pixels of the path.</p>
</div></div><!-- @@@dragMargin -->
<br/>
<!-- $$$dragging -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="dragging-prop">
<td class="tblQmlPropNode"><p>
<a name="dragging-prop"></a><span class="name">dragging</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds whether the view is currently moving due to the user dragging the view.</p>
</div></div><!-- @@@dragging -->
<br/>
<!-- $$$flickDeceleration -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="flickDeceleration-prop">
<td class="tblQmlPropNode"><p>
<a name="flickDeceleration-prop"></a><span class="name">flickDeceleration</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the rate at which a flick will decelerate.</p>
<p>The default is 100.</p>
</div></div><!-- @@@flickDeceleration -->
<br/>
<!-- $$$flicking -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="flicking-prop">
<td class="tblQmlPropNode"><p>
<a name="flicking-prop"></a><span class="name">flicking</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds whether the view is currently moving due to the user flicking the view.</p>
</div></div><!-- @@@flicking -->
<br/>
<!-- $$$highlight -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="highlight-prop">
<td class="tblQmlPropNode"><p>
<a name="highlight-prop"></a><span class="name">highlight</span> : <span class="type">Component</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the component to use as the highlight.</p>
<p>An instance of the highlight component will be created for each view. The geometry of the resultant component instance will be managed by the view so as to stay with the current item.</p>
<p>The below example demonstrates how to make a simple highlight. Note the use of the <a href="qml-qtquick-pathview.html#onPath-attached-prop">PathView.onPath</a> attached property to ensure that the highlight is hidden when flicked away from the path.</p>
<pre class="qml">



</pre>
<p><b>See also </b><a href="qml-qtquick-pathview.html#highlightItem-prop">highlightItem</a> and <a href="qml-qtquick-pathview.html#highlightRangeMode-prop">highlightRangeMode</a>.</p>
</div></div><!-- @@@highlight -->
<br/>
<!-- $$$highlightItem -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="highlightItem-prop">
<td class="tblQmlPropNode"><p>
<a name="highlightItem-prop"></a><span class="name">highlightItem</span> : <span class="type"><a href="qml-qtquick-item.html">Item</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p><code>highlightItem</code> holds the highlight item, which was created from the <a href="qtquick-views-example.html#highlight">highlight</a> component.</p>
<p><b>See also </b><a href="qtquick-views-example.html#highlight">highlight</a>.</p>
</div></div><!-- @@@highlightItem -->
<br/>
<!-- $$$highlightMoveDuration -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="highlightMoveDuration-prop">
<td class="tblQmlPropNode"><p>
<a name="highlightMoveDuration-prop"></a><span class="name">highlightMoveDuration</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the move animation duration of the highlight delegate.</p>
<p>If the <a href="qml-qtquick-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> is StrictlyEnforceRange then this property determines the speed that the items move along the path.</p>
<p>The default value for the duration is 300ms.</p>
</div></div><!-- @@@highlightMoveDuration -->
<br/>
<!-- $$$highlightRangeMode -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="highlightRangeMode-prop">
<td class="tblQmlPropNode"><p>
<a name="highlightRangeMode-prop"></a><span class="name">highlightRangeMode</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>These properties set the preferred range of the highlight (current item) within the view. The preferred values must be in the range 0.0-1.0&#x2e;</p>
<p>Valid values for <code>highlightRangeMode</code> are:</p>
<ul>
<li><i>PathView.NoHighlightRange</i> - no range is applied and the highlight will move freely within the view.</li>
<li><i>PathView.ApplyRange</i> - the view will attempt to maintain the highlight within the range, however the highlight can move outside of the range at the ends of the path or due to a mouse interaction.</li>
<li><i>PathView.StrictlyEnforceRange</i> - the highlight will never move outside of the range. This means that the current item will change if a keyboard or mouse action would cause the highlight to move outside of the range.</li>
</ul>
<p>The default value is <i>PathView.StrictlyEnforceRange</i>.</p>
<p>Defining a highlight range is the correct way to influence where the current item ends up when the view moves. For example, if you want the currently selected item to be in the middle of the path, then set the highlight range to be 0.5,0.5 and highlightRangeMode to <i>PathView.StrictlyEnforceRange</i>. Then, when the path scrolls, the currently selected item will be the item at that position. This also applies to when the currently selected item changes - it will scroll to within the preferred highlight range. Furthermore, the behaviour of the current item index will occur whether or not a highlight exists.</p>
<p><b>Note: </b>A valid range requires <code>preferredHighlightEnd</code> to be greater than or equal to <code>preferredHighlightBegin</code>.</p></div></div><!-- @@@highlightRangeMode -->
<br/>
<!-- $$$interactive -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="interactive-prop">
<td class="tblQmlPropNode"><p>
<a name="interactive-prop"></a><span class="name">interactive</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>A user cannot drag or flick a <a href="qml-qtquick-pathview.html">PathView</a> that is not interactive.</p>
<p>This property is useful for temporarily disabling flicking. This allows special interaction with <a href="qml-qtquick-pathview.html">PathView</a>'s children.</p>
</div></div><!-- @@@interactive -->
<br/>
<!-- $$$maximumFlickVelocity -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="maximumFlickVelocity-prop">
<td class="tblQmlPropNode"><p>
<a name="maximumFlickVelocity-prop"></a><span class="name">maximumFlickVelocity</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the approximate maximum velocity that the user can flick the view in pixels/second.</p>
<p>The default value is platform dependent.</p>
</div></div><!-- @@@maximumFlickVelocity -->
<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">model</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the model providing data for the view.</p>
<p>The model provides a set of data that is used to create the items for the view. For large or dynamic datasets the model is usually provided by a C++ model object. Models can also be created directly in QML, using the ListModel type.</p>
<p><b>Note: </b>changing the model will reset the offset and <a href="qml-qtquick-pathview.html#currentIndex-prop">currentIndex</a> to 0.</p><p><b>See also </b><a href="qtquick-modelviewsdata-modelview.html#qml-data-models">Data Models</a>.</p>
</div></div><!-- @@@model -->
<br/>
<!-- $$$movementDirection -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="movementDirection-prop">
<td class="tblQmlPropNode"><p>
<a name="movementDirection-prop"></a><span class="name">movementDirection</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property determines the direction in which items move when setting the current index. The possible values are:</p>
<ul>
<li><a href="qml-qtquick-pathview.html">PathView</a>.Shortest (default) - the items move in the direction that requires the least movement, which could be either <code>Negative</code> or <code>Positive</code>.</li>
<li><a href="qml-qtquick-pathview.html">PathView</a>.Negative - the items move backwards towards their destination.</li>
<li><a href="qml-qtquick-pathview.html">PathView</a>.Positive - the items move forwards towards their destination.</li>
</ul>
<p>For example, suppose that there are 5 items in the model, and <a href="qml-qtquick-pathview.html#currentIndex-prop">currentIndex</a> is <code>0</code>. If <a href="qml-qtquick-pathview.html#currentIndex-prop">currentIndex</a> is set to <code>2</code>,</p>
<ul>
<li>a <code>Positive</code> movement direction will result in the following order: 0, 1, 2</li>
<li>a <code>Negative</code> movement direction will result in the following order: 0, 5, 4, 3, 2</li>
<li>a <code>Shortest</code> movement direction will result in same order with <code>Positive</code> .</li>
</ul>
<p><b>Note: </b>this property doesn't affect the movement of <a href="qml-qtquick-pathview.html#incrementCurrentIndex-method">incrementCurrentIndex()</a> and <a href="qml-qtquick-pathview.html#decrementCurrentIndex-method">decrementCurrentIndex()</a>.</p><p>This property was introduced in  Qt 5.7.</p>
</div></div><!-- @@@movementDirection -->
<br/>
<!-- $$$moving -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="moving-prop">
<td class="tblQmlPropNode"><p>
<a name="moving-prop"></a><span class="name">moving</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds whether the view is currently moving due to the user either dragging or flicking the view.</p>
</div></div><!-- @@@moving -->
<br/>
<!-- $$$offset -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="offset-prop">
<td class="tblQmlPropNode"><p>
<a name="offset-prop"></a><span class="name">offset</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The offset specifies how far along the path the items are from their initial positions. This is a real number that ranges from 0.0 to the count of items in the model.</p>
</div></div><!-- @@@offset -->
<br/>
<!-- $$$path -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="path-prop">
<td class="tblQmlPropNode"><p>
<a name="path-prop"></a><span class="name">path</span> : <span class="type"><a href="qml-qtquick-path.html">Path</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the path used to lay out the items. For more information see the <a href="qml-qtquick-path.html">Path</a> documentation.</p>
</div></div><!-- @@@path -->
<br/>
<!-- $$$pathItemCount -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="pathItemCount-prop">
<td class="tblQmlPropNode"><p>
<a name="pathItemCount-prop"></a><span class="name">pathItemCount</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the number of items visible on the path at any one time.</p>
<p>Setting pathItemCount to undefined will show all items on the path.</p>
</div></div><!-- @@@pathItemCount -->
<br/>
<!-- $$$preferredHighlightBegin -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="preferredHighlightBegin-prop">
<td class="tblQmlPropNode"><p>
<a name="preferredHighlightBegin-prop"></a><span class="name">preferredHighlightBegin</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>These properties set the preferred range of the highlight (current item) within the view. The preferred values must be in the range 0.0-1.0&#x2e;</p>
<p>Valid values for <code>highlightRangeMode</code> are:</p>
<ul>
<li><i>PathView.NoHighlightRange</i> - no range is applied and the highlight will move freely within the view.</li>
<li><i>PathView.ApplyRange</i> - the view will attempt to maintain the highlight within the range, however the highlight can move outside of the range at the ends of the path or due to a mouse interaction.</li>
<li><i>PathView.StrictlyEnforceRange</i> - the highlight will never move outside of the range. This means that the current item will change if a keyboard or mouse action would cause the highlight to move outside of the range.</li>
</ul>
<p>The default value is <i>PathView.StrictlyEnforceRange</i>.</p>
<p>Defining a highlight range is the correct way to influence where the current item ends up when the view moves. For example, if you want the currently selected item to be in the middle of the path, then set the highlight range to be 0.5,0.5 and <a href="qml-qtquick-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> to <i>PathView.StrictlyEnforceRange</i>. Then, when the path scrolls, the currently selected item will be the item at that position. This also applies to when the currently selected item changes - it will scroll to within the preferred highlight range. Furthermore, the behaviour of the current item index will occur whether or not a highlight exists.</p>
<p><b>Note: </b>A valid range requires <code>preferredHighlightEnd</code> to be greater than or equal to <code>preferredHighlightBegin</code>.</p></div></div><!-- @@@preferredHighlightBegin -->
<br/>
<!-- $$$preferredHighlightEnd -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="preferredHighlightEnd-prop">
<td class="tblQmlPropNode"><p>
<a name="preferredHighlightEnd-prop"></a><span class="name">preferredHighlightEnd</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>These properties set the preferred range of the highlight (current item) within the view. The preferred values must be in the range 0.0-1.0&#x2e;</p>
<p>Valid values for <code>highlightRangeMode</code> are:</p>
<ul>
<li><i>PathView.NoHighlightRange</i> - no range is applied and the highlight will move freely within the view.</li>
<li><i>PathView.ApplyRange</i> - the view will attempt to maintain the highlight within the range, however the highlight can move outside of the range at the ends of the path or due to a mouse interaction.</li>
<li><i>PathView.StrictlyEnforceRange</i> - the highlight will never move outside of the range. This means that the current item will change if a keyboard or mouse action would cause the highlight to move outside of the range.</li>
</ul>
<p>The default value is <i>PathView.StrictlyEnforceRange</i>.</p>
<p>Defining a highlight range is the correct way to influence where the current item ends up when the view moves. For example, if you want the currently selected item to be in the middle of the path, then set the highlight range to be 0.5,0.5 and <a href="qml-qtquick-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> to <i>PathView.StrictlyEnforceRange</i>. Then, when the path scrolls, the currently selected item will be the item at that position. This also applies to when the currently selected item changes - it will scroll to within the preferred highlight range. Furthermore, the behaviour of the current item index will occur whether or not a highlight exists.</p>
<p><b>Note: </b>A valid range requires <code>preferredHighlightEnd</code> to be greater than or equal to <code>preferredHighlightBegin</code>.</p></div></div><!-- @@@preferredHighlightEnd -->
<br/>
<!-- $$$snapMode -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="snapMode-prop">
<td class="tblQmlPropNode"><p>
<a name="snapMode-prop"></a><span class="name">snapMode</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property determines how the items will settle following a drag or flick. The possible values are:</p>
<ul>
<li><a href="qml-qtquick-pathview.html">PathView</a>.NoSnap (default) - the items stop anywhere along the path.</li>
<li><a href="qml-qtquick-pathview.html">PathView</a>.SnapToItem - the items settle with an item aligned with the <a href="qml-qtquick-pathview.html#preferredHighlightBegin-prop">preferredHighlightBegin</a>.</li>
<li><a href="qml-qtquick-pathview.html">PathView</a>.SnapOneItem - the items settle no more than one item away from the item nearest <a href="qml-qtquick-pathview.html#preferredHighlightBegin-prop">preferredHighlightBegin</a> at the time the press is released. This mode is particularly useful for moving one page at a time.</li>
</ul>
<p><code>snapMode</code> does not affect the <a href="qml-qtquick-pathview.html#currentIndex-prop">currentIndex</a>. To update the <a href="qml-qtquick-pathview.html#currentIndex-prop">currentIndex</a> as the view is moved, set <a href="qml-qtquick-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> to <code>PathView.StrictlyEnforceRange</code> (default for <a href="qml-qtquick-pathview.html">PathView</a>).</p>
<p><b>See also </b><a href="qml-qtquick-pathview.html#highlightRangeMode-prop">highlightRangeMode</a>.</p>
</div></div><!-- @@@snapMode -->
<br/>
<h2>Attached Property Documentation</h2>
<!-- $$$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="name">PathView.isCurrentItem</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This attached property is true if this delegate is the current item; otherwise false.</p>
<p>It is attached to each instance of the delegate.</p>
<p>This property may be used to adjust the appearance of the current item.</p>
<pre class="qml">

      Component {
          id: delegate
          Column {
              id: wrapper
              opacity: PathView.isCurrentItem ? 1 : 0.5
              Image {
                  anchors.horizontalCenter: nameText.horizontalCenter
                  width: 64; height: 64
                  source: icon
              }
              Text {
                  id: nameText
                  text: name
                  font.pointSize: 16
              }
          }
      }

</pre>
</div></div><!-- @@@isCurrentItem -->
<br/>
<!-- $$$onPath -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="onPath-attached-prop">
<td class="tblQmlPropNode"><p>
<a name="onPath-attached-prop"></a><span class="name">PathView.onPath</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This attached property holds whether the item is currently on the path.</p>
<p>If a <a href="qml-qtquick-pathview.html#pathItemCount-prop">pathItemCount</a> has been set, it is possible that some items may be instantiated, but not considered to be currently on the path. Usually, these items would be set invisible, for example:</p>
<pre class="qml">



</pre>
<p>It is attached to each instance of the delegate.</p>
</div></div><!-- @@@onPath -->
<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="name">PathView.view</span> : <span class="type"><a href="qml-qtquick-pathview.html">PathView</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This attached property holds the view that manages this delegate instance.</p>
<p>It is attached to each instance of the delegate.</p>
</div></div><!-- @@@view -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$dragEnded -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="dragEnded-signal">
<td class="tblQmlFuncNode"><p>
<a name="dragEnded-signal"></a><span class="name">dragEnded</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the user stops dragging the view.</p>
<p>If the velocity of the drag is suffient at the time the touch/mouse button is released then a flick will start.</p>
<p>The corresponding handler is <code>onDragEnded</code>.</p>
</div></div><!-- @@@dragEnded -->
<br/>
<!-- $$$dragStarted -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="dragStarted-signal">
<td class="tblQmlFuncNode"><p>
<a name="dragStarted-signal"></a><span class="name">dragStarted</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the view starts to be dragged due to user interaction.</p>
<p>The corresponding handler is <code>onDragStarted</code>.</p>
</div></div><!-- @@@dragStarted -->
<br/>
<!-- $$$flickEnded -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="flickEnded-signal">
<td class="tblQmlFuncNode"><p>
<a name="flickEnded-signal"></a><span class="name">flickEnded</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the view stops moving due to a flick.</p>
<p>The corresponding handler is <code>onFlickEnded</code>.</p>
</div></div><!-- @@@flickEnded -->
<br/>
<!-- $$$flickStarted -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="flickStarted-signal">
<td class="tblQmlFuncNode"><p>
<a name="flickStarted-signal"></a><span class="name">flickStarted</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the view is flicked. A flick starts from the point that the mouse or touch is released, while still in motion.</p>
<p>The corresponding handler is <code>onFlickStarted</code>.</p>
</div></div><!-- @@@flickStarted -->
<br/>
<!-- $$$movementEnded -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="movementEnded-signal">
<td class="tblQmlFuncNode"><p>
<a name="movementEnded-signal"></a><span class="name">movementEnded</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the view stops moving due to user interaction. If a flick was generated, this signal will be emitted once the flick stops. If a flick was not generated, this signal will be emitted when the user stops dragging - i.e&#x2e; a mouse or touch release.</p>
<p>The corresponding handler is <code>onMovementEnded</code>.</p>
</div></div><!-- @@@movementEnded -->
<br/>
<!-- $$$movementStarted -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="movementStarted-signal">
<td class="tblQmlFuncNode"><p>
<a name="movementStarted-signal"></a><span class="name">movementStarted</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the view begins moving due to user interaction.</p>
<p>The corresponding handler is <code>onMovementStarted</code>.</p>
</div></div><!-- @@@movementStarted -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$decrementCurrentIndex -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="decrementCurrentIndex-method">
<td class="tblQmlFuncNode"><p>
<a name="decrementCurrentIndex-method"></a><span class="name">decrementCurrentIndex</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Decrements the current index.</p>
<p><b>Note</b>: methods should only be called after the Component has completed.</p>
</div></div><!-- @@@decrementCurrentIndex -->
<br/>
<!-- $$$incrementCurrentIndex -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="incrementCurrentIndex-method">
<td class="tblQmlFuncNode"><p>
<a name="incrementCurrentIndex-method"></a><span class="name">incrementCurrentIndex</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Increments the current index.</p>
<p><b>Note</b>: methods should only be called after the Component has completed.</p>
</div></div><!-- @@@incrementCurrentIndex -->
<br/>
<!-- $$$indexAt -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="indexAt-method">
<td class="tblQmlFuncNode"><p>
<a name="indexAt-method"></a><span class="type">int</span> <span class="name">indexAt</span>(<span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Returns the index of the item containing the point <i>x</i>, <i>y</i> in content coordinates. If there is no item at the point specified, -1 is returned.</p>
<p><b>Note</b>: methods should only be called after the Component has completed.</p>
</div></div><!-- @@@indexAt -->
<br/>
<!-- $$$itemAt -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="itemAt-method">
<td class="tblQmlFuncNode"><p>
<a name="itemAt-method"></a><span class="type"><a href="qml-qtquick-item.html">Item</a></span> <span class="name">itemAt</span>(<span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Returns the item containing the point <i>x</i>, <i>y</i> in content coordinates. If there is no item at the point specified, null is returned.</p>
<p><b>Note</b>: methods should only be called after the Component has completed.</p>
</div></div><!-- @@@itemAt -->
<br/>
<!-- $$$positionViewAtIndex -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="positionViewAtIndex-method">
<td class="tblQmlFuncNode"><p>
<a name="positionViewAtIndex-method"></a><span class="name">positionViewAtIndex</span>(<span class="type">int</span> <i>index</i>,  <span class="type">PositionMode</span> <i>mode</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Positions the view such that the <i>index</i> is at the position specified by <i>mode</i>:</p>
<ul>
<li><a href="qml-qtquick-pathview.html">PathView</a>.Beginning - position item at the beginning of the path.</li>
<li><a href="qml-qtquick-pathview.html">PathView</a>.Center - position item in the center of the path.</li>
<li><a href="qml-qtquick-pathview.html">PathView</a>.End - position item at the end of the path.</li>
<li><a href="qml-qtquick-pathview.html">PathView</a>.Contain - ensure the item is positioned on the path.</li>
<li><a href="qml-qtquick-pathview.html">PathView</a>.SnapPosition - position the item at <a href="qml-qtquick-pathview.html#preferredHighlightBegin-prop">preferredHighlightBegin</a>. This mode is only valid if <a href="qml-qtquick-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> is StrictlyEnforceRange or snapping is enabled via <a href="qml-qtquick-pathview.html#snapMode-prop">snapMode</a>.</li>
</ul>
<p><b>Note</b>: methods should only be called after the Component has completed. To position the view at startup, this method should be called by Component.onCompleted. For example, to position the view at the end:</p>
<pre class="cpp">

  Component<span class="operator">.</span>onCompleted: positionViewAtIndex(count <span class="operator">-</span> <span class="number">1</span><span class="operator">,</span> PathView<span class="operator">.</span>End)

</pre>
</div></div><!-- @@@positionViewAtIndex -->
<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>