Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 4429

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qlistview.cpp -->
<head>
  <title>Qt 4.6: QListView Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QListView"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QListView Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QListView class provides a list or icon view onto a model. <a href="#details">More...</a></p>
<pre> #include &lt;QListView&gt;</pre><p>Inherits <a href="qabstractitemview.html">QAbstractItemView</a>.</p>
<p>Inherited by <a href="qhelpindexwidget.html">QHelpIndexWidget</a>, <a href="qlistwidget.html">QListWidget</a>, and <a href="qundoview.html">QUndoView</a>.</p>
<ul>
<li><a href="qlistview-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#Flow-enum">Flow</a></b> { LeftToRight, TopToBottom }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#LayoutMode-enum">LayoutMode</a></b> { SinglePass, Batched }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#Movement-enum">Movement</a></b> { Static, Free, Snap }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#ResizeMode-enum">ResizeMode</a></b> { Fixed, Adjust }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#ViewMode-enum">ViewMode</a></b> { ListMode, IconMode }</td></tr>
</table>
<hr />
<a name="properties"></a>
<h2>Properties</h2>
<p><table class="propsummary" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="45%" valign="top"><ul>
<li><div class="fn"><b><a href="qlistview.html#batchSize-prop">batchSize</a></b> : int</div></li>
<li><div class="fn"><b><a href="qlistview.html#flow-prop">flow</a></b> : Flow</div></li>
<li><div class="fn"><b><a href="qlistview.html#gridSize-prop">gridSize</a></b> : QSize</div></li>
<li><div class="fn"><b><a href="qlistview.html#isWrapping-prop">isWrapping</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qlistview.html#layoutMode-prop">layoutMode</a></b> : LayoutMode</div></li>
<li><div class="fn"><b><a href="qlistview.html#modelColumn-prop">modelColumn</a></b> : int</div></li>
<li><div class="fn"><b><a href="qlistview.html#movement-prop">movement</a></b> : Movement</div></li>
</ul></td><td valign="top"><ul>
<li><div class="fn"><b><a href="qlistview.html#resizeMode-prop">resizeMode</a></b> : ResizeMode</div></li>
<li><div class="fn"><b><a href="qlistview.html#selectionRectVisible-prop">selectionRectVisible</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qlistview.html#spacing-prop">spacing</a></b> : int</div></li>
<li><div class="fn"><b><a href="qlistview.html#uniformItemSizes-prop">uniformItemSizes</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qlistview.html#viewMode-prop">viewMode</a></b> : ViewMode</div></li>
<li><div class="fn"><b><a href="qlistview.html#wordWrap-prop">wordWrap</a></b> : bool</div></li>
</ul>
</td></tr>
</table></p>
<ul>
<li><div bar="2" class="fn"></div>16 properties inherited from <a href="qabstractitemview.html#properties">QAbstractItemView</a></li>
<li><div bar="2" class="fn"></div>2 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
<li><div bar="2" class="fn"></div>6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li><div bar="2" class="fn"></div>58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#QListView">QListView</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#dtor.QListView">~QListView</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#batchSize-prop">batchSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#clearPropertyFlags">clearPropertyFlags</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Flow </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#flow-prop">flow</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#gridSize-prop">gridSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#isRowHidden">isRowHidden</a></b> ( int <i>row</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#selectionRectVisible-prop">isSelectionRectVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#isWrapping-prop">isWrapping</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">LayoutMode </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#layoutMode-prop">layoutMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#modelColumn-prop">modelColumn</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Movement </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#movement-prop">movement</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ResizeMode </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#resizeMode-prop">resizeMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#batchSize-prop">setBatchSize</a></b> ( int <i>batchSize</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#flow-prop">setFlow</a></b> ( Flow <i>flow</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#gridSize-prop">setGridSize</a></b> ( const QSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#layoutMode-prop">setLayoutMode</a></b> ( LayoutMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#modelColumn-prop">setModelColumn</a></b> ( int <i>column</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#movement-prop">setMovement</a></b> ( Movement <i>movement</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#resizeMode-prop">setResizeMode</a></b> ( ResizeMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#setRowHidden">setRowHidden</a></b> ( int <i>row</i>, bool <i>hide</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#selectionRectVisible-prop">setSelectionRectVisible</a></b> ( bool <i>show</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#spacing-prop">setSpacing</a></b> ( int <i>space</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#uniformItemSizes-prop">setUniformItemSizes</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#viewMode-prop">setViewMode</a></b> ( ViewMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#wordWrap-prop">setWordWrap</a></b> ( bool <i>on</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#isWrapping-prop">setWrapping</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#spacing-prop">spacing</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#uniformItemSizes-prop">uniformItemSizes</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ViewMode </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#viewMode-prop">viewMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#wordWrap-prop">wordWrap</a></b> () const</td></tr>
</table>
<hr />
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#indexAt">indexAt</a></b> ( const QPoint &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#scrollTo">scrollTo</a></b> ( const QModelIndex &amp; <i>index</i>, ScrollHint <i>hint</i> = EnsureVisible )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QRect </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#visualRect">visualRect</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>57 public functions inherited from <a href="qabstractitemview.html#public-functions">QAbstractItemView</a></li>
<li><div bar="2" class="fn"></div>17 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
<li><div bar="2" class="fn"></div>14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li><div bar="2" class="fn"></div>217 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<hr />
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#indexesMoved">indexesMoved</a></b> ( const QModelIndexList &amp; <i>indexes</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>6 signals inherited from <a href="qabstractitemview.html#signals">QAbstractItemView</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<hr />
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#rectForIndex">rectForIndex</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#setPositionForIndex">setPositionForIndex</a></b> ( const QPoint &amp; <i>position</i>, const QModelIndex &amp; <i>index</i> )</td></tr>
</table>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#currentChanged">currentChanged</a></b> ( const QModelIndex &amp; <i>current</i>, const QModelIndex &amp; <i>previous</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#dataChanged">dataChanged</a></b> ( const QModelIndex &amp; <i>topLeft</i>, const QModelIndex &amp; <i>bottomRight</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#dragLeaveEvent">dragLeaveEvent</a></b> ( QDragLeaveEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#dragMoveEvent">dragMoveEvent</a></b> ( QDragMoveEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#dropEvent">dropEvent</a></b> ( QDropEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#horizontalOffset">horizontalOffset</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#isIndexHidden">isIndexHidden</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#moveCursor">moveCursor</a></b> ( CursorAction <i>cursorAction</i>, Qt::KeyboardModifiers <i>modifiers</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a></b> ( const QModelIndex &amp; <i>parent</i>, int <i>start</i>, int <i>end</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#rowsInserted">rowsInserted</a></b> ( const QModelIndex &amp; <i>parent</i>, int <i>start</i>, int <i>end</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndexList </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#selectedIndexes">selectedIndexes</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#selectionChanged">selectionChanged</a></b> ( const QItemSelection &amp; <i>selected</i>, const QItemSelection &amp; <i>deselected</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#setSelection">setSelection</a></b> ( const QRect &amp; <i>rect</i>, QItemSelectionModel::SelectionFlags <i>command</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#startDrag">startDrag</a></b> ( Qt::DropActions <i>supportedActions</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#timerEvent">timerEvent</a></b> ( QTimerEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#updateGeometries">updateGeometries</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#verticalOffset">verticalOffset</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QStyleOptionViewItem </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#viewOptions">viewOptions</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QRegion </td><td class="memItemRight" valign="bottom"><b><a href="qlistview.html#visualRegionForSelection">visualRegionForSelection</a></b> ( const QItemSelection &amp; <i>selection</i> ) const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>36 protected functions inherited from <a href="qabstractitemview.html#protected-functions">QAbstractItemView</a></li>
<li><div bar="2" class="fn"></div>18 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
<li><div bar="2" class="fn"></div>3 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li><div bar="2" class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>9 public slots inherited from <a href="qabstractitemview.html#public-slots">QAbstractItemView</a></li>
<li><div class="fn"></div>19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"></div>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>9 protected slots inherited from <a href="qabstractitemview.html#protected-slots">QAbstractItemView</a></li>
<li><div class="fn"></div>1 protected slot inherited from <a href="qabstractscrollarea.html#protected-slots">QAbstractScrollArea</a></li>
<li><div class="fn"></div>1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QListView class provides a list or icon view onto a model.</p>
<p>A QListView presents items stored in a model, either as a simple non-hierarchical list, or as a collection of icons. This class is used to provide lists and icon views that were previously provided by the <tt>QListBox</tt> and <tt>QIconView</tt> classes, but using the more flexible approach provided by Qt's model/view architecture.</p>
<p>The QListView class is one of the <a href="model-view.html">Model/View Classes</a> and is part of Qt's <a href="model-view-programming.html">model/view framework</a>.</p>
<p>This view does not display horizontal or vertical headers; to display a list of items with a horizontal header, use <a href="qtreeview.html">QTreeView</a> instead.</p>
<p>QListView implements the interfaces defined by the <a href="qabstractitemview.html">QAbstractItemView</a> class to allow it to display data provided by models derived from the <a href="qabstractitemmodel.html">QAbstractItemModel</a> class.</p>
<p>Items in a list view can be displayed using one of two view modes: In <a href="qlistview.html#ViewMode-enum">ListMode</a>, the items are displayed in the form of a simple list; in <a href="qlistview.html#ViewMode-enum">IconMode</a>, the list view takes the form of an <i>icon view</i> in which the items are displayed with icons like files in a file manager. By default, the list view is in <a href="qlistview.html#ViewMode-enum">ListMode</a>. To change the view mode, use the <a href="qlistview.html#viewMode-prop">setViewMode</a>() function, and to determine the current view mode, use <a href="qlistview.html#viewMode-prop">viewMode</a>().</p>
<p>Items in these views are laid out in the direction specified by the <a href="qlistview.html#flow-prop">flow</a>() of the list view. The items may be fixed in place, or allowed to move, depending on the view's <a href="qlistview.html#movement-prop">movement</a>() state.</p>
<p>If the items in the model cannot be completely laid out in the direction of flow, they can be wrapped at the boundary of the view widget; this depends on <a href="qlistview.html#isWrapping-prop">isWrapping</a>(). This property is useful when the items are being represented by an icon view.</p>
<p>The <a href="qlistview.html#resizeMode-prop">resizeMode</a>() and <a href="qlistview.html#layoutMode-prop">layoutMode</a>() govern how and when the items are laid out. Items are spaced according to their <a href="qlistview.html#spacing-prop">spacing</a>(), and can exist within a notional grid of size specified by <a href="qlistview.html#gridSize-prop">gridSize</a>(). The items can be rendered as large or small icons depending on their <a href="qabstractitemview.html#iconSize-prop">iconSize</a>().</p>
<p><table class="generic" width="100%" align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td><img src="images/windowsxp-listview.png" alt="Screenshot of a Windows XP style list view" /></td><td><img src="images/macintosh-listview.png" alt="Screenshot of a Macintosh style table view" /></td><td><img src="images/plastique-listview.png" alt="Screenshot of a Plastique style table view" /></td></tr>
<tr valign="top" class="even"><td>A <a href="gallery-windowsxp.html">Windows XP style</a> list view.</td><td>A <a href="gallery-macintosh.html">Macintosh style</a> list view.</td><td>A <a href="gallery-plastique.html">Plastique style</a> list view.</td></tr>
</table></p>
<a name="improving-performance"></a>
<h3>Improving Performance</h3>
<p>It is possible to give the view hints about the data it is handling in order to improve its performance when displaying large numbers of items. One approach that can be taken for views that are intended to display items with equal sizes is to set the <a href="qlistview.html#uniformItemSizes-prop">uniformItemSizes</a> property to true.</p>
<p>See also <a href="model-view-view.html">View Classes</a>, <a href="qtreeview.html">QTreeView</a>, <a href="qtableview.html">QTableView</a>, and <a href="qlistwidget.html">QListWidget</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tag/QListView/Flow"></a>
<a name="//apple_ref/cpp/econst/QListView/LeftToRight"></a>
<a name="//apple_ref/cpp/econst/QListView/TopToBottom"></a>
<h3 class="fn"><a name="Flow-enum"></a>enum QListView::Flow</h3>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QListView::LeftToRight</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items are laid out in the view from the left to the right.</td></tr>
<tr><td valign="top"><tt>QListView::TopToBottom</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items are laid out in the view from the top to the bottom.</td></tr>
</table></p>
<a name="//apple_ref/cpp/tag/QListView/LayoutMode"></a>
<a name="//apple_ref/cpp/econst/QListView/SinglePass"></a>
<a name="//apple_ref/cpp/econst/QListView/Batched"></a>
<h3 class="fn"><a name="LayoutMode-enum"></a>enum QListView::LayoutMode</h3>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QListView::SinglePass</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items are laid out all at once.</td></tr>
<tr><td valign="top"><tt>QListView::Batched</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items are laid out in batches of <a href="qlistview.html#batchSize-prop">batchSize</a> items.</td></tr>
</table></p>
<p>See also <a href="qlistview.html#batchSize-prop">batchSize</a>.</p>
<a name="//apple_ref/cpp/tag/QListView/Movement"></a>
<a name="//apple_ref/cpp/econst/QListView/Static"></a>
<a name="//apple_ref/cpp/econst/QListView/Free"></a>
<a name="//apple_ref/cpp/econst/QListView/Snap"></a>
<h3 class="fn"><a name="Movement-enum"></a>enum QListView::Movement</h3>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QListView::Static</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items cannot be moved by the user.</td></tr>
<tr><td valign="top"><tt>QListView::Free</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items can be moved freely by the user.</td></tr>
<tr><td valign="top"><tt>QListView::Snap</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The items snap to the specified grid when moved; see <a href="qlistview.html#gridSize-prop">setGridSize</a>().</td></tr>
</table></p>
<a name="//apple_ref/cpp/tag/QListView/ResizeMode"></a>
<a name="//apple_ref/cpp/econst/QListView/Fixed"></a>
<a name="//apple_ref/cpp/econst/QListView/Adjust"></a>
<h3 class="fn"><a name="ResizeMode-enum"></a>enum QListView::ResizeMode</h3>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QListView::Fixed</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items will only be laid out the first time the view is shown.</td></tr>
<tr><td valign="top"><tt>QListView::Adjust</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items will be laid out every time the view is resized.</td></tr>
</table></p>
<a name="//apple_ref/cpp/tag/QListView/ViewMode"></a>
<a name="//apple_ref/cpp/econst/QListView/ListMode"></a>
<a name="//apple_ref/cpp/econst/QListView/IconMode"></a>
<h3 class="fn"><a name="ViewMode-enum"></a>enum QListView::ViewMode</h3>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QListView::ListMode</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items are laid out using <a href="qlistview.html#Flow-enum">TopToBottom</a> flow, with Small size and Static movement</td></tr>
<tr><td valign="top"><tt>QListView::IconMode</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items are laid out using <a href="qlistview.html#Flow-enum">LeftToRight</a> flow, with Large size and Free movement</td></tr>
</table></p>
<hr />
<h2>Property Documentation</h2>
<a name="//apple_ref/cpp/instm/QListView/batchSize"></a>
<a name="//apple_ref/cpp/instm/QListView/setBatchSize"></a>
<h3 class="fn"><a name="batchSize-prop"></a>batchSize : int</h3>
<p>This property holds the number of items laid out in each batch if layoutMode is set to Batched.</p>
<p>The default value is 100.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>batchSize</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setBatchSize</b> ( int <i>batchSize</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QListView/flow"></a>
<a name="//apple_ref/cpp/instm/QListView/setFlow"></a>
<h3 class="fn"><a name="flow-prop"></a>flow : <a href="qlistview.html#Flow-enum">Flow</a></h3>
<p>This property holds which direction the items layout should flow.</p>
<p>If this property is <a href="qlistview.html#Flow-enum">LeftToRight</a>, the items will be laid out left to right. If the <a href="qlistview.html#isWrapping-prop">isWrapping</a> property is true, the layout will wrap when it reaches the right side of the visible area. If this property is <a href="qlistview.html#Flow-enum">TopToBottom</a>, the items will be laid out from the top of the visible area, wrapping when it reaches the bottom.</p>
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
<p>By default, this property is set to <a href="qlistview.html#Flow-enum">TopToBottom</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Flow </td><td class="memItemRight" valign="bottom"><b>flow</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFlow</b> ( Flow <i>flow</i> )</td></tr>
</table>
<p>See also <a href="qlistview.html#viewMode-prop">viewMode</a>.</p>
<a name="//apple_ref/cpp/instm/QListView/gridSize"></a>
<a name="//apple_ref/cpp/instm/QListView/setGridSize"></a>
<h3 class="fn"><a name="gridSize-prop"></a>gridSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds the size of the layout grid.</p>
<p>This property is the size of the grid in which the items are laid out. The default is an empty size which means that there is no grid and the layout is not done in a grid. Setting this property to a non-empty size switches on the grid layout. (When a grid layout is in force the <a href="qlistview.html#spacing-prop">spacing</a> property is ignored.)</p>
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b>gridSize</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setGridSize</b> ( const QSize &amp; <i>size</i> )</td></tr>
</table>
<p>See also <a href="qlistview.html#viewMode-prop">viewMode</a>.</p>
<a name="//apple_ref/cpp/instm/QListView/isWrapping"></a>
<a name="//apple_ref/cpp/instm/QListView/setWrapping"></a>
<h3 class="fn"><a name="isWrapping-prop"></a>isWrapping : bool</h3>
<p>This property holds whether the items layout should wrap.</p>
<p>This property holds whether the layout should wrap when there is no more space in the visible area. The point at which the layout wraps depends on the <a href="qlistview.html#flow-prop">flow</a> property.</p>
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
<p>By default, this property is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isWrapping</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWrapping</b> ( bool <i>enable</i> )</td></tr>
</table>
<p>See also <a href="qlistview.html#viewMode-prop">viewMode</a>.</p>
<a name="//apple_ref/cpp/instm/QListView/layoutMode"></a>
<a name="//apple_ref/cpp/instm/QListView/setLayoutMode"></a>
<h3 class="fn"><a name="layoutMode-prop"></a>layoutMode : <a href="qlistview.html#LayoutMode-enum">LayoutMode</a></h3>
<p>This property determines whether the layout of items should happen immediately or be delayed.</p>
<p>This property holds the layout mode for the items. When the mode is <a href="qlistview.html#LayoutMode-enum">SinglePass</a> (the default), the items are laid out all in one go. When the mode is <a href="qlistview.html#LayoutMode-enum">Batched</a>, the items are laid out in batches of <a href="qlistview.html#batchSize-prop">batchSize</a> items, while processing events. This makes it possible to instantly view and interact with the visible items while the rest are being laid out.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">LayoutMode </td><td class="memItemRight" valign="bottom"><b>layoutMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setLayoutMode</b> ( LayoutMode <i>mode</i> )</td></tr>
</table>
<p>See also <a href="qlistview.html#viewMode-prop">viewMode</a>.</p>
<a name="//apple_ref/cpp/instm/QListView/modelColumn"></a>
<a name="//apple_ref/cpp/instm/QListView/setModelColumn"></a>
<h3 class="fn"><a name="modelColumn-prop"></a>modelColumn : int</h3>
<p>This property holds the column in the model that is visible.</p>
<p>By default, this property contains 0, indicating that the first column in the model will be shown.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>modelColumn</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setModelColumn</b> ( int <i>column</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QListView/movement"></a>
<a name="//apple_ref/cpp/instm/QListView/setMovement"></a>
<h3 class="fn"><a name="movement-prop"></a>movement : <a href="qlistview.html#Movement-enum">Movement</a></h3>
<p>This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.</p>
<p>This property determines how the user can move the items in the view. <a href="qlistview.html#Movement-enum">Static</a> means that the items can't be moved the user. <a href="qlistview.html#Movement-enum">Free</a> means that the user can drag and drop the items to any position in the view. <a href="qlistview.html#Movement-enum">Snap</a> means that the user can drag and drop the items, but only to the positions in a notional grid signified by the <a href="qlistview.html#gridSize-prop">gridSize</a> property.</p>
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
<p>By default, this property is set to <a href="qlistview.html#Movement-enum">Static</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Movement </td><td class="memItemRight" valign="bottom"><b>movement</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMovement</b> ( Movement <i>movement</i> )</td></tr>
</table>
<p>See also <a href="qlistview.html#gridSize-prop">gridSize</a>, <a href="qlistview.html#resizeMode-prop">resizeMode</a>, and <a href="qlistview.html#viewMode-prop">viewMode</a>.</p>
<a name="//apple_ref/cpp/instm/QListView/resizeMode"></a>
<a name="//apple_ref/cpp/instm/QListView/setResizeMode"></a>
<h3 class="fn"><a name="resizeMode-prop"></a>resizeMode : <a href="qlistview.html#ResizeMode-enum">ResizeMode</a></h3>
<p>This property holds whether the items are laid out again when the view is resized.</p>
<p>If this property is <a href="qlistview.html#ResizeMode-enum">Adjust</a>, the items will be laid out again when the view is resized. If the value is <a href="qlistview.html#ResizeMode-enum">Fixed</a>, the items will not be laid out when the view is resized.</p>
<p>By default, this property is set to <a href="qlistview.html#ResizeMode-enum">Fixed</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">ResizeMode </td><td class="memItemRight" valign="bottom"><b>resizeMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setResizeMode</b> ( ResizeMode <i>mode</i> )</td></tr>
</table>
<p>See also <a href="qlistview.html#movement-prop">movement</a>, <a href="qlistview.html#gridSize-prop">gridSize</a>, and <a href="qlistview.html#viewMode-prop">viewMode</a>.</p>
<a name="//apple_ref/cpp/instm/QListView/isSelectionRectVisible"></a>
<a name="//apple_ref/cpp/instm/QListView/setSelectionRectVisible"></a>
<h3 class="fn"><a name="selectionRectVisible-prop"></a>selectionRectVisible : bool</h3>
<p>This property holds if the selection rectangle should be visible.</p>
<p>If this property is true then the selection rectangle is visible; otherwise it will be hidden.</p>
<p><b>Note:</b> The selection rectangle will only be visible if the selection mode is in a mode where more than one item can be selected; i.e&#x2e;, it will not draw a selection rectangle if the selection mode is <a href="qabstractitemview.html#SelectionMode-enum">QAbstractItemView::SingleSelection</a>.</p>
<p>By default, this property is false.</p>
<p>This property was introduced in Qt 4.3.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isSelectionRectVisible</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSelectionRectVisible</b> ( bool <i>show</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QListView/spacing"></a>
<a name="//apple_ref/cpp/instm/QListView/setSpacing"></a>
<h3 class="fn"><a name="spacing-prop"></a>spacing : int</h3>
<p>This property holds the space around the items in the layout.</p>
<p>This property is the size of the empty space that is padded around an item in the layout.</p>
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
<p>By default, this property contains a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>spacing</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSpacing</b> ( int <i>space</i> )</td></tr>
</table>
<p>See also <a href="qlistview.html#viewMode-prop">viewMode</a>.</p>
<a name="//apple_ref/cpp/instm/QListView/uniformItemSizes"></a>
<a name="//apple_ref/cpp/instm/QListView/setUniformItemSizes"></a>
<h3 class="fn"><a name="uniformItemSizes-prop"></a>uniformItemSizes : bool</h3>
<p>This property holds whether all items in the listview have the same size.</p>
<p>This property should only be set to true if it is guaranteed that all items in the view have the same size. This enables the view to do some optimizations for performance purposes.</p>
<p>By default, this property is false.</p>
<p>This property was introduced in Qt 4.1.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>uniformItemSizes</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setUniformItemSizes</b> ( bool <i>enable</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QListView/viewMode"></a>
<a name="//apple_ref/cpp/instm/QListView/setViewMode"></a>
<h3 class="fn"><a name="viewMode-prop"></a>viewMode : <a href="qlistview.html#ViewMode-enum">ViewMode</a></h3>
<p>This property holds the view mode of the QListView.</p>
<p>This property will change the other unset properties to conform with the set view mode. <a href="qlistview.html">QListView</a>-specific properties that have already been set will not be changed, unless <a href="qlistview.html#clearPropertyFlags">clearPropertyFlags</a>() has been called.</p>
<p>Setting the view mode will enable or disable drag and drop based on the selected movement. For <a href="qlistview.html#ViewMode-enum">ListMode</a>, the default movement is <a href="qlistview.html#Movement-enum">Static</a> (drag and drop disabled); for <a href="qlistview.html#ViewMode-enum">IconMode</a>, the default movement is <a href="qlistview.html#Movement-enum">Free</a> (drag and drop enabled).</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">ViewMode </td><td class="memItemRight" valign="bottom"><b>viewMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setViewMode</b> ( ViewMode <i>mode</i> )</td></tr>
</table>
<p>See also <a href="qlistview.html#isWrapping-prop">isWrapping</a>, <a href="qlistview.html#spacing-prop">spacing</a>, <a href="qlistview.html#gridSize-prop">gridSize</a>, <a href="qlistview.html#flow-prop">flow</a>, <a href="qlistview.html#movement-prop">movement</a>, and <a href="qlistview.html#resizeMode-prop">resizeMode</a>.</p>
<a name="//apple_ref/cpp/instm/QListView/wordWrap"></a>
<a name="//apple_ref/cpp/instm/QListView/setWordWrap"></a>
<h3 class="fn"><a name="wordWrap-prop"></a>wordWrap : bool</h3>
<p>This property holds the item text word-wrapping policy.</p>
<p>If this property is true then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is false by default.</p>
<p>Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's <a href="qabstractitemview.html#textElideMode-prop">textElideMode</a>.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>wordWrap</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWordWrap</b> ( bool <i>on</i> )</td></tr>
</table>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QListView/QListView"></a>
<h3 class="fn"><a name="QListView"></a>QListView::QListView ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
<p>Creates a new <a href="qlistview.html">QListView</a> with the given <i>parent</i> to view a model. Use <a href="qabstractitemview.html#setModel">setModel</a>() to set the model.</p>
<a name="//apple_ref/cpp/instm/QListView/~QListView"></a>
<h3 class="fn"><a name="dtor.QListView"></a>QListView::~QListView ()</h3>
<p>Destroys the view.</p>
<a name="//apple_ref/cpp/instm/QListView/clearPropertyFlags"></a>
<h3 class="fn"><a name="clearPropertyFlags"></a>void QListView::clearPropertyFlags ()</h3>
<p>Clears the <a href="qlistview.html">QListView</a>-specific property flags. See <a href="qlistview.html#viewMode-prop">viewMode</a>.</p>
<p>Properties inherited from <a href="qabstractitemview.html">QAbstractItemView</a> are not covered by the property flags. Specifically, <a href="qabstractitemview.html#dragEnabled-prop">dragEnabled</a> and <a href="qwidget.html#acceptDrops-prop">acceptsDrops</a> are computed by <a href="qlistview.html">QListView</a> when calling <a href="qlistview.html#movement-prop">setMovement</a>() or <a href="qlistview.html#viewMode-prop">setViewMode</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/currentChanged"></a>
<h3 class="fn"><a name="currentChanged"></a>void QListView::currentChanged ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>current</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>previous</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#currentChanged">QAbstractItemView::currentChanged</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/dataChanged"></a>
<h3 class="fn"><a name="dataChanged"></a>void QListView::dataChanged ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>topLeft</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>bottomRight</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#dataChanged">QAbstractItemView::dataChanged</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/dragLeaveEvent"></a>
<h3 class="fn"><a name="dragLeaveEvent"></a>void QListView::dragLeaveEvent ( <a href="qdragleaveevent.html">QDragLeaveEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dragLeaveEvent">QWidget::dragLeaveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/dragMoveEvent"></a>
<h3 class="fn"><a name="dragMoveEvent"></a>void QListView::dragMoveEvent ( <a href="qdragmoveevent.html">QDragMoveEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dragMoveEvent">QWidget::dragMoveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/dropEvent"></a>
<h3 class="fn"><a name="dropEvent"></a>void QListView::dropEvent ( <a href="qdropevent.html">QDropEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dropEvent">QWidget::dropEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/event"></a>
<h3 class="fn"><a name="event"></a>bool QListView::event ( <a href="qevent.html">QEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/horizontalOffset"></a>
<h3 class="fn"><a name="horizontalOffset"></a>int QListView::horizontalOffset () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#horizontalOffset">QAbstractItemView::horizontalOffset</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/indexAt"></a>
<h3 class="fn"><a name="indexAt"></a><a href="qmodelindex.html">QModelIndex</a> QListView::indexAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>p</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#indexAt">QAbstractItemView::indexAt</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/indexesMoved"></a>
<h3 class="fn"><a name="indexesMoved"></a>void QListView::indexesMoved ( const <a href="qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a> &amp; <i>indexes</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the specified <i>indexes</i> are moved in the view.</p>
<p>This function was introduced in Qt 4.2.</p>
<a name="//apple_ref/cpp/instm/QListView/isIndexHidden"></a>
<h3 class="fn"><a name="isIndexHidden"></a>bool QListView::isIndexHidden ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#isIndexHidden">QAbstractItemView::isIndexHidden</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/isRowHidden"></a>
<h3 class="fn"><a name="isRowHidden"></a>bool QListView::isRowHidden ( int <i>row</i> ) const</h3>
<p>Returns true if the <i>row</i> is hidden; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QListView/mouseMoveEvent"></a>
<h3 class="fn"><a name="mouseMoveEvent"></a>void QListView::mouseMoveEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget::mouseMoveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/mouseReleaseEvent"></a>
<h3 class="fn"><a name="mouseReleaseEvent"></a>void QListView::mouseReleaseEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget::mouseReleaseEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/moveCursor"></a>
<h3 class="fn"><a name="moveCursor"></a><a href="qmodelindex.html">QModelIndex</a> QListView::moveCursor ( <a href="qabstractitemview.html#CursorAction-enum">CursorAction</a> <i>cursorAction</i>, <a href="qt.html#KeyboardModifier-enum">Qt::KeyboardModifiers</a> <i>modifiers</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#moveCursor">QAbstractItemView::moveCursor</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/paintEvent"></a>
<h3 class="fn"><a name="paintEvent"></a>void QListView::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/rectForIndex"></a>
<h3 class="fn"><a name="rectForIndex"></a><a href="qrect.html">QRect</a> QListView::rectForIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Returns the rectangle of the item at position <i>index</i> in the model. The rectangle is in contents coordinates.</p>
<p>See also <a href="qlistview.html#visualRect">visualRect</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/resizeEvent"></a>
<h3 class="fn"><a name="resizeEvent"></a>void QListView::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/rowsAboutToBeRemoved"></a>
<h3 class="fn"><a name="rowsAboutToBeRemoved"></a>void QListView::rowsAboutToBeRemoved ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i>, int <i>start</i>, int <i>end</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#rowsAboutToBeRemoved">QAbstractItemView::rowsAboutToBeRemoved</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/rowsInserted"></a>
<h3 class="fn"><a name="rowsInserted"></a>void QListView::rowsInserted ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i>, int <i>start</i>, int <i>end</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#rowsInserted">QAbstractItemView::rowsInserted</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/scrollTo"></a>
<h3 class="fn"><a name="scrollTo"></a>void QListView::scrollTo ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i>, <a href="qabstractitemview.html#ScrollHint-enum">ScrollHint</a> <i>hint</i> = EnsureVisible )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#scrollTo">QAbstractItemView::scrollTo</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/selectedIndexes"></a>
<h3 class="fn"><a name="selectedIndexes"></a><a href="qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a> QListView::selectedIndexes () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#selectedIndexes">QAbstractItemView::selectedIndexes</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/selectionChanged"></a>
<h3 class="fn"><a name="selectionChanged"></a>void QListView::selectionChanged ( const <a href="qitemselection.html">QItemSelection</a> &amp; <i>selected</i>, const <a href="qitemselection.html">QItemSelection</a> &amp; <i>deselected</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#selectionChanged">QAbstractItemView::selectionChanged</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/setPositionForIndex"></a>
<h3 class="fn"><a name="setPositionForIndex"></a>void QListView::setPositionForIndex ( const <a href="qpoint.html">QPoint</a> &amp; <i>position</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Sets the contents position of the item at <i>index</i> in the model to the given <i>position</i>. If the list view's movement mode is Static or its view mode is ListView, this function will have no effect.</p>
<p>This function was introduced in Qt 4.1.</p>
<a name="//apple_ref/cpp/instm/QListView/setRowHidden"></a>
<h3 class="fn"><a name="setRowHidden"></a>void QListView::setRowHidden ( int <i>row</i>, bool <i>hide</i> )</h3>
<p>If <i>hide</i> is true, the given <i>row</i> will be hidden; otherwise the <i>row</i> will be shown.</p>
<p>See also <a href="qlistview.html#isRowHidden">isRowHidden</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/setSelection"></a>
<h3 class="fn"><a name="setSelection"></a>void QListView::setSelection ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i>, <a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a> <i>command</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#setSelection">QAbstractItemView::setSelection</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/startDrag"></a>
<h3 class="fn"><a name="startDrag"></a>void QListView::startDrag ( <a href="qt.html#DropAction-enum">Qt::DropActions</a> <i>supportedActions</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#startDrag">QAbstractItemView::startDrag</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/timerEvent"></a>
<h3 class="fn"><a name="timerEvent"></a>void QListView::timerEvent ( <a href="qtimerevent.html">QTimerEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/updateGeometries"></a>
<h3 class="fn"><a name="updateGeometries"></a>void QListView::updateGeometries ()&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#updateGeometries">QAbstractItemView::updateGeometries</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/verticalOffset"></a>
<h3 class="fn"><a name="verticalOffset"></a>int QListView::verticalOffset () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#verticalOffset">QAbstractItemView::verticalOffset</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/viewOptions"></a>
<h3 class="fn"><a name="viewOptions"></a><a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a> QListView::viewOptions () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#viewOptions">QAbstractItemView::viewOptions</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/visualRect"></a>
<h3 class="fn"><a name="visualRect"></a><a href="qrect.html">QRect</a> QListView::visualRect ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#visualRect">QAbstractItemView::visualRect</a>().</p>
<a name="//apple_ref/cpp/instm/QListView/visualRegionForSelection"></a>
<h3 class="fn"><a name="visualRegionForSelection"></a><a href="qregion.html">QRegion</a> QListView::visualRegionForSelection ( const <a href="qitemselection.html">QItemSelection</a> &amp; <i>selection</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#visualRegionForSelection">QAbstractItemView::visualRegionForSelection</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>