Sophie

Sophie

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

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">
<!-- qabstractitemview.cpp -->
<head>
  <title>Qt 4.6: QAbstractItemView Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QAbstractItemView"></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">QAbstractItemView Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QAbstractItemView class provides the basic functionality for item view classes. <a href="#details">More...</a></p>
<pre> #include &lt;QAbstractItemView&gt;</pre><p>Inherits <a href="qabstractscrollarea.html">QAbstractScrollArea</a>.</p>
<p>Inherited by <a href="qcolumnview.html">QColumnView</a>, <a href="qheaderview.html">QHeaderView</a>, <a href="qlistview.html">QListView</a>, <a href="qtableview.html">QTableView</a>, and <a href="qtreeview.html">QTreeView</a>.</p>
<ul>
<li><a href="qabstractitemview-members.html">List of all members, including inherited members</a></li>
<li><a href="qabstractitemview-obsolete.html">Obsolete 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="qabstractitemview.html#DragDropMode-enum">DragDropMode</a></b> { NoDragDrop, DragOnly, DropOnly, DragDrop, InternalMove }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a></b> { NoEditTriggers, CurrentChanged, DoubleClicked, SelectedClicked, ..., AllEditTriggers }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">flags </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#EditTrigger-enum">EditTriggers</a></b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#ScrollHint-enum">ScrollHint</a></b> { EnsureVisible, PositionAtTop, PositionAtBottom, PositionAtCenter }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#ScrollMode-enum">ScrollMode</a></b> { ScrollPerItem, ScrollPerPixel }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a></b> { SelectItems, SelectRows, SelectColumns }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a></b> { SingleSelection, ContiguousSelection, ExtendedSelection, MultiSelection, NoSelection }</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="qabstractitemview.html#alternatingRowColors-prop">alternatingRowColors</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#autoScroll-prop">autoScroll</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#autoScrollMargin-prop">autoScrollMargin</a></b> : int</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#defaultDropAction-prop">defaultDropAction</a></b> : Qt::DropAction</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#dragDropMode-prop">dragDropMode</a></b> : DragDropMode</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#dragEnabled-prop">dragEnabled</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#editTriggers-prop">editTriggers</a></b> : EditTriggers</div></li>
</ul></td><td valign="top"><ul>
<li><div class="fn"><b><a href="qabstractitemview.html#horizontalScrollMode-prop">horizontalScrollMode</a></b> : ScrollMode</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#iconSize-prop">iconSize</a></b> : QSize</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#selectionBehavior-prop">selectionBehavior</a></b> : SelectionBehavior</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#selectionMode-prop">selectionMode</a></b> : SelectionMode</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#tabKeyNavigation-prop">tabKeyNavigation</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#textElideMode-prop">textElideMode</a></b> : Qt::TextElideMode</div></li>
<li><div class="fn"><b><a href="qabstractitemview.html#verticalScrollMode-prop">verticalScrollMode</a></b> : ScrollMode</div></li>
</ul>
</td></tr>
</table></p>
<ul>
<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="qabstractitemview.html#QAbstractItemView">QAbstractItemView</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="qabstractitemview.html#dtor.QAbstractItemView">~QAbstractItemView</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#alternatingRowColors-prop">alternatingRowColors</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#autoScrollMargin-prop">autoScrollMargin</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#closePersistentEditor">closePersistentEditor</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#currentIndex">currentIndex</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::DropAction </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#defaultDropAction-prop">defaultDropAction</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">DragDropMode </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dragDropMode-prop">dragDropMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dragEnabled-prop">dragEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EditTriggers </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#editTriggers-prop">editTriggers</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#autoScroll-prop">hasAutoScroll</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ScrollMode </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#horizontalScrollMode-prop">horizontalScrollMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#iconSize-prop">iconSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#indexAt">indexAt</a></b> ( const QPoint &amp; <i>point</i> ) const = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#indexWidget">indexWidget</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemDelegate * </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#itemDelegate">itemDelegate</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemDelegate * </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#itemDelegate-2">itemDelegate</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemDelegate * </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#itemDelegateForColumn">itemDelegateForColumn</a></b> ( int <i>column</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemDelegate * </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#itemDelegateForRow">itemDelegateForRow</a></b> ( int <i>row</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#keyboardSearch">keyboardSearch</a></b> ( const QString &amp; <i>search</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemModel * </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#model">model</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#openPersistentEditor">openPersistentEditor</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#rootIndex">rootIndex</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#scrollTo">scrollTo</a></b> ( const QModelIndex &amp; <i>index</i>, ScrollHint <i>hint</i> = EnsureVisible ) = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemView::SelectionBehavior </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#selectionBehavior-prop">selectionBehavior</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemView::SelectionMode </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#selectionMode-prop">selectionMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QItemSelectionModel * </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#selectionModel">selectionModel</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#alternatingRowColors-prop">setAlternatingRowColors</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="qabstractitemview.html#autoScroll-prop">setAutoScroll</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="qabstractitemview.html#autoScrollMargin-prop">setAutoScrollMargin</a></b> ( int <i>margin</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#defaultDropAction-prop">setDefaultDropAction</a></b> ( Qt::DropAction <i>dropAction</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dragDropMode-prop">setDragDropMode</a></b> ( DragDropMode <i>behavior</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dragDropOverwriteMode-prop">setDragDropOverwriteMode</a></b> ( bool <i>overwrite</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dragEnabled-prop">setDragEnabled</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="qabstractitemview.html#showDropIndicator-prop">setDropIndicatorShown</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="qabstractitemview.html#editTriggers-prop">setEditTriggers</a></b> ( EditTriggers <i>triggers</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#horizontalScrollMode-prop">setHorizontalScrollMode</a></b> ( ScrollMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#iconSize-prop">setIconSize</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="qabstractitemview.html#setIndexWidget">setIndexWidget</a></b> ( const QModelIndex &amp; <i>index</i>, QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a></b> ( QAbstractItemDelegate * <i>delegate</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setItemDelegateForColumn">setItemDelegateForColumn</a></b> ( int <i>column</i>, QAbstractItemDelegate * <i>delegate</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setItemDelegateForRow">setItemDelegateForRow</a></b> ( int <i>row</i>, QAbstractItemDelegate * <i>delegate</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setModel">setModel</a></b> ( QAbstractItemModel * <i>model</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#selectionBehavior-prop">setSelectionBehavior</a></b> ( QAbstractItemView::SelectionBehavior <i>behavior</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#selectionMode-prop">setSelectionMode</a></b> ( QAbstractItemView::SelectionMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a></b> ( QItemSelectionModel * <i>selectionModel</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#tabKeyNavigation-prop">setTabKeyNavigation</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="qabstractitemview.html#textElideMode-prop">setTextElideMode</a></b> ( Qt::TextElideMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#verticalScrollMode-prop">setVerticalScrollMode</a></b> ( ScrollMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#sizeHintForColumn">sizeHintForColumn</a></b> ( int <i>column</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#sizeHintForIndex">sizeHintForIndex</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#sizeHintForRow">sizeHintForRow</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="qabstractitemview.html#tabKeyNavigation-prop">tabKeyNavigation</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::TextElideMode </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#textElideMode-prop">textElideMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ScrollMode </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#verticalScrollMode-prop">verticalScrollMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QRect </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#visualRect">visualRect</a></b> ( const QModelIndex &amp; <i>index</i> ) const = 0</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 QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#inputMethodQuery">inputMethodQuery</a></b> ( Qt::InputMethodQuery <i>query</i> ) const</td></tr>
</table>
<ul>
<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="public-slots"></a>
<h2>Public Slots</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="qabstractitemview.html#clearSelection">clearSelection</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#edit">edit</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#reset">reset</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#scrollToBottom">scrollToBottom</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#scrollToTop">scrollToTop</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#selectAll">selectAll</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setRootIndex">setRootIndex</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#update">update</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</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="qabstractitemview.html#activated">activated</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#clicked">clicked</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#doubleClicked">doubleClicked</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#entered">entered</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#pressed">pressed</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#viewportEntered">viewportEntered</a></b> ()</td></tr>
</table>
<ul>
<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-types"></a>
<h2>Protected 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="qabstractitemview.html#CursorAction-enum">CursorAction</a></b> { MoveUp, MoveDown, MoveLeft, MoveRight, ..., MovePrevious }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#DropIndicatorPosition-enum">DropIndicatorPosition</a></b> { OnItem, AboveItem, BelowItem, OnViewport }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#State-enum">State</a></b> { NoState, DraggingState, DragSelectingState, EditingState, ..., AnimatingState }</td></tr>
</table>
<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">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">DropIndicatorPosition </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dropIndicatorPosition">dropIndicatorPosition</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#edit-2">edit</a></b> ( const QModelIndex &amp; <i>index</i>, EditTrigger <i>trigger</i>, QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#executeDelayedItemsLayout">executeDelayedItemsLayout</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#horizontalOffset">horizontalOffset</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#isIndexHidden">isIndexHidden</a></b> ( const QModelIndex &amp; <i>index</i> ) const = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#moveCursor">moveCursor</a></b> ( CursorAction <i>cursorAction</i>, Qt::KeyboardModifiers <i>modifiers</i> ) = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#scheduleDelayedItemsLayout">scheduleDelayedItemsLayout</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a></b> ( int <i>dx</i>, int <i>dy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndexList </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QItemSelectionModel::SelectionFlags </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#selectionCommand">selectionCommand</a></b> ( const QModelIndex &amp; <i>index</i>, const QEvent * <i>event</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setDirtyRegion">setDirtyRegion</a></b> ( const QRegion &amp; <i>region</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setSelection">setSelection</a></b> ( const QRect &amp; <i>rect</i>, QItemSelectionModel::SelectionFlags <i>flags</i> ) = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#setState">setState</a></b> ( State <i>state</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#startDrag">startDrag</a></b> ( Qt::DropActions <i>supportedActions</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">State </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#state">state</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#verticalOffset">verticalOffset</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QStyleOptionViewItem </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.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="qabstractitemview.html#visualRegionForSelection">visualRegionForSelection</a></b> ( const QItemSelection &amp; <i>selection</i> ) const = 0</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="qabstractitemview.html#dragEnterEvent">dragEnterEvent</a></b> ( QDragEnterEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dragLeaveEvent">dragLeaveEvent</a></b> ( QDragLeaveEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dragMoveEvent">dragMoveEvent</a></b> ( QDragMoveEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#dropEvent">dropEvent</a></b> ( QDropEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#focusNextPrevChild">focusNextPrevChild</a></b> ( bool <i>next</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#inputMethodEvent">inputMethodEvent</a></b> ( QInputMethodEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#timerEvent">timerEvent</a></b> ( QTimerEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#viewportEvent">viewportEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
</table>
<ul>
<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>
<hr />
<a name="protected-slots"></a>
<h2>Protected Slots</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="qabstractitemview.html#closeEditor">closeEditor</a></b> ( QWidget * <i>editor</i>, QAbstractItemDelegate::EndEditHint <i>hint</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.html#commitData">commitData</a></b> ( QWidget * <i>editor</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.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="qabstractitemview.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="qabstractitemview.html#editorDestroyed">editorDestroyed</a></b> ( QObject * <i>editor</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.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="qabstractitemview.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 void </td><td class="memItemRight" valign="bottom"><b><a href="qabstractitemview.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="qabstractitemview.html#updateGeometries">updateGeometries</a></b> ()</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>1 protected slot inherited from <a href="qabstractscrollarea.html#protected-slots">QAbstractScrollArea</a></li>
<li><div bar="2" class="fn"></div>1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<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>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QAbstractItemView class provides the basic functionality for item view classes.</p>
<p>QAbstractItemView class is the base class for every standard view that uses a <a href="qabstractitemmodel.html">QAbstractItemModel</a>. QAbstractItemView is an abstract class and cannot itself be instantiated. It provides a standard interface for interoperating with models through the signals and slots mechanism, enabling subclasses to be kept up-to-date with changes to their models. This class provides standard support for keyboard and mouse navigation, viewport scrolling, item editing, and selections. The keyboard navigation implements this functionality:</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Keys</th><th>Functionality</th></tr></thead>
<tr valign="top" class="odd"><td>Arrow keys</td><td>Changes the current item and selects it.</td></tr>
<tr valign="top" class="even"><td>Ctrl+Arrow keys</td><td>Changes the current item but does not select it.</td></tr>
<tr valign="top" class="odd"><td>Shift+Arrow keys</td><td>Changes the current item and selects it. The previously selected item(s) is not deselected.</td></tr>
<tr valign="top" class="even"><td>Ctr+Space</td><td>Toggles selection of the current item.</td></tr>
<tr valign="top" class="odd"><td>Tab/Backtab</td><td>Changes the current item to the next/previous item.</td></tr>
<tr valign="top" class="even"><td>Home/End</td><td>Selects the first/last item in the model.</td></tr>
<tr valign="top" class="odd"><td>Page up/Page down</td><td>Scrolls the rows shown up/down by the number of visible rows in the view.</td></tr>
<tr valign="top" class="even"><td>Ctrl+A</td><td>Selects all items in the model.</td></tr>
</table></p>
<p>Note that the above table assumes that the <a href="qabstractitemview.html#selectionMode-prop">selection mode</a> allows the operations. For instance, you cannot select items if the selection mode is <a href="qabstractitemview.html#SelectionMode-enum">QAbstractItemView::NoSelection</a>.</p>
<p>The QAbstractItemView 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>The view classes that inherit QAbstractItemView only need to implement their own view-specific functionality, such as drawing items, returning the geometry of items, finding items, etc.</p>
<p>QAbstractItemView provides common slots such as <a href="qabstractitemview.html#edit">edit</a>() and <a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a>(). Many protected slots are also provided, including <a href="qabstractitemview.html#dataChanged">dataChanged</a>(), <a href="qabstractitemview.html#rowsInserted">rowsInserted</a>(), <a href="qabstractitemview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a>(), <a href="qabstractitemview.html#selectionChanged">selectionChanged</a>(), and <a href="qabstractitemview.html#currentChanged">currentChanged</a>().</p>
<p>The root item is returned by <a href="qabstractitemview.html#rootIndex">rootIndex</a>(), and the current item by <a href="qabstractitemview.html#currentIndex">currentIndex</a>(). To make sure that an item is visible use <a href="qabstractitemview.html#scrollTo">scrollTo</a>().</p>
<p>Some of QAbstractItemView's functions are concerned with scrolling, for example <a href="qabstractitemview.html#horizontalScrollMode-prop">setHorizontalScrollMode</a>() and <a href="qabstractitemview.html#verticalScrollMode-prop">setVerticalScrollMode</a>(). To set the range of the scroll bars, you can, for example, reimplement the view's <a href="qabstractitemview.html#resizeEvent">resizeEvent</a>() function:</p>
<pre> void MyView::resizeEvent(QResizeEvent *event) {
     horizontalScrollBar()-&gt;setRange(0, realWidth - width());
     ...
 }</pre>
<p>Note that the range is not updated until the widget is shown.</p>
<p>Several other functions are concerned with selection control; for example <a href="qabstractitemview.html#selectionMode-prop">setSelectionMode</a>(), and <a href="qabstractitemview.html#selectionBehavior-prop">setSelectionBehavior</a>(). This class provides a default selection model to work with (<a href="qabstractitemview.html#selectionModel">selectionModel</a>()), but this can be replaced by using <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>() with an instance of <a href="qitemselectionmodel.html">QItemSelectionModel</a>.</p>
<p>For complete control over the display and editing of items you can specify a delegate with <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>().</p>
<p>QAbstractItemView provides a lot of protected functions. Some are concerned with editing, for example, <a href="qabstractitemview.html#edit">edit</a>(), and <a href="qabstractitemview.html#commitData">commitData</a>(), whilst others are keyboard and mouse event handlers.</p>
<p><b>Note:</b> If you inherit QAbstractItemView and intend to update the contents of the viewport, you should use viewport-&gt;<a href="qabstractitemview.html#update">update</a>() instead of <a href="qwidget.html#update">update()</a> as all painting operations take place on the viewport.</p>
<p>See also <a href="model-view-view.html">View Classes</a>, <a href="model-view-programming.html">Model/View Programming</a>, <a href="qabstractitemmodel.html">QAbstractItemModel</a>, and <a href="itemviews-chart.html">Chart Example</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tag/QAbstractItemView/CursorAction"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MoveUp"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MoveDown"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MoveLeft"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MoveRight"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MoveHome"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MoveEnd"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MovePageUp"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MovePageDown"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MoveNext"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MovePrevious"></a>
<h3 class="fn"><a name="CursorAction-enum"></a>enum QAbstractItemView::CursorAction</h3>
<p>This enum describes the different ways to navigate between items,</p>
<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>QAbstractItemView::MoveUp</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Move to the item above the current item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MoveDown</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Move to the item below the current item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MoveLeft</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Move to the item left of the current item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MoveRight</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Move to the item right of the current item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MoveHome</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">Move to the top-left corner item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MoveEnd</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">Move to the bottom-right corner item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MovePageUp</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">Move one page up above the current item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MovePageDown</tt></td><td align="center" valign="top"><tt>7</tt></td><td valign="top">Move one page down below the current item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MoveNext</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">Move to the item after the current item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MovePrevious</tt></td><td align="center" valign="top"><tt>9</tt></td><td valign="top">Move to the item before the current item.</td></tr>
</table></p>
<p>See also <a href="qabstractitemview.html#moveCursor">moveCursor</a>().</p>
<a name="//apple_ref/cpp/tag/QAbstractItemView/DragDropMode"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/NoDragDrop"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/DragOnly"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/DropOnly"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/DragDrop"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/InternalMove"></a>
<h3 class="fn"><a name="DragDropMode-enum"></a>enum QAbstractItemView::DragDropMode</h3>
<p>Describes the various drag and drop events the view can act upon. By default the view does not support dragging or dropping (<tt>NoDragDrop</tt>).</p>
<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>QAbstractItemView::NoDragDrop</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Does not support dragging or dropping.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::DragOnly</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The view supports dragging of its own items</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::DropOnly</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The view accepts drops</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::DragDrop</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The view supports both dragging and dropping</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::InternalMove</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">The view accepts move (<b>not copy</b>) operations only from itself.</td></tr>
</table></p>
<p>Note that the model used needs to provide support for drag and drop operations.</p>
<p>This enum was introduced in Qt 4.2.</p>
<p>See also <a href="qabstractitemview.html#dragDropMode-prop">setDragDropMode</a>() and <a href="model-view-dnd.html">Using Drag and Drop with Item Views</a>.</p>
<a name="//apple_ref/cpp/tag/QAbstractItemView/DropIndicatorPosition"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/OnItem"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/AboveItem"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/BelowItem"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/OnViewport"></a>
<h3 class="fn"><a name="DropIndicatorPosition-enum"></a>enum QAbstractItemView::DropIndicatorPosition</h3>
<p>This enum indicates the position of the drop indicator in relation to the index at the current mouse position:</p>
<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>QAbstractItemView::OnItem</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The item will be dropped on the index.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::AboveItem</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The item will be dropped above the index.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::BelowItem</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The item will be dropped below the index.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::OnViewport</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The item will be dropped onto a region of the viewport with no items. The way each view handles items dropped onto the viewport depends on the behavior of the underlying model in use.</td></tr>
</table></p>
<a name="//apple_ref/cpp/tag/QAbstractItemView/EditTrigger"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/NoEditTriggers"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/CurrentChanged"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/DoubleClicked"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/SelectedClicked"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/EditKeyPressed"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/AnyKeyPressed"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/AllEditTriggers"></a>
<a name="//apple_ref/cpp/tdef/QAbstractItemView/EditTriggers"></a>
<h3 class="flags"><a name="EditTrigger-enum"></a>enum QAbstractItemView::EditTrigger<br />flags QAbstractItemView::EditTriggers</h3>
<p>This enum describes actions which will initiate item editing.</p>
<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>QAbstractItemView::NoEditTriggers</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">No editing possible.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::CurrentChanged</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Editing start whenever current item changes.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::DoubleClicked</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Editing starts when an item is double clicked.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::SelectedClicked</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">Editing starts when clicking on an already selected item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::EditKeyPressed</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">Editing starts when the platform edit key has been pressed over an item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::AnyKeyPressed</tt></td><td align="center" valign="top"><tt>16</tt></td><td valign="top">Editing starts when any key is pressed over an item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::AllEditTriggers</tt></td><td align="center" valign="top"><tt>31</tt></td><td valign="top">Editing starts for all above actions.</td></tr>
</table></p>
<p>The EditTriggers type is a typedef for <a href="qflags.html">QFlags</a>&lt;EditTrigger&gt;. It stores an OR combination of EditTrigger values.</p>
<a name="//apple_ref/cpp/tag/QAbstractItemView/ScrollHint"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/EnsureVisible"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/PositionAtTop"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/PositionAtBottom"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/PositionAtCenter"></a>
<h3 class="fn"><a name="ScrollHint-enum"></a>enum QAbstractItemView::ScrollHint</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>QAbstractItemView::EnsureVisible</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Scroll to ensure that the item is visible.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::PositionAtTop</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Scroll to position the item at the top of the viewport.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::PositionAtBottom</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Scroll to position the item at the bottom of the viewport.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::PositionAtCenter</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Scroll to position the item at the center of the viewport.</td></tr>
</table></p>
<a name="//apple_ref/cpp/tag/QAbstractItemView/ScrollMode"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/ScrollPerItem"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/ScrollPerPixel"></a>
<h3 class="fn"><a name="ScrollMode-enum"></a>enum QAbstractItemView::ScrollMode</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>QAbstractItemView::ScrollPerItem</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The view will scroll the contents one item at a time.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::ScrollPerPixel</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The view will scroll the contents one pixel at a time.</td></tr>
</table></p>
<p>This enum was introduced in Qt 4.2.</p>
<a name="//apple_ref/cpp/tag/QAbstractItemView/SelectionBehavior"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/SelectItems"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/SelectRows"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/SelectColumns"></a>
<h3 class="fn"><a name="SelectionBehavior-enum"></a>enum QAbstractItemView::SelectionBehavior</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>QAbstractItemView::SelectItems</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Selecting single items.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::SelectRows</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Selecting only rows.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::SelectColumns</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Selecting only columns.</td></tr>
</table></p>
<a name="//apple_ref/cpp/tag/QAbstractItemView/SelectionMode"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/SingleSelection"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/ContiguousSelection"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/ExtendedSelection"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/MultiSelection"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/NoSelection"></a>
<h3 class="fn"><a name="SelectionMode-enum"></a>enum QAbstractItemView::SelectionMode</h3>
<p>This enum indicates how the view responds to user selections:</p>
<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>QAbstractItemView::SingleSelection</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">When the user selects an item, any already-selected item becomes unselected, and the user cannot unselect the selected item by clicking on it.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::ContiguousSelection</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::ExtendedSelection</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item. Multiple items can be selected by dragging the mouse over them.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::MultiSelection</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone. Multiple items can be toggled by dragging the mouse over them.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::NoSelection</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Items cannot be selected.</td></tr>
</table></p>
<p>The most commonly used modes are SingleSelection and ExtendedSelection.</p>
<a name="//apple_ref/cpp/tag/QAbstractItemView/State"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/NoState"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/DraggingState"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/DragSelectingState"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/EditingState"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/ExpandingState"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/CollapsingState"></a>
<a name="//apple_ref/cpp/econst/QAbstractItemView/AnimatingState"></a>
<h3 class="fn"><a name="State-enum"></a>enum QAbstractItemView::State</h3>
<p>Describes the different states the view can be in. This is usually only interesting when reimplementing your own view.</p>
<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>QAbstractItemView::NoState</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The is the default state.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::DraggingState</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The user is dragging items.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::DragSelectingState</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The user is selecting items.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::EditingState</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The user is editing an item in a widget editor.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::ExpandingState</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">The user is opening a branch of items.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::CollapsingState</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">The user is closing a branch of items.</td></tr>
<tr><td valign="top"><tt>QAbstractItemView::AnimatingState</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">The item view is performing an animation.</td></tr>
</table></p>
<hr />
<h2>Property Documentation</h2>
<a name="//apple_ref/cpp/instm/QAbstractItemView/alternatingRowColors"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setAlternatingRowColors"></a>
<h3 class="fn"><a name="alternatingRowColors-prop"></a>alternatingRowColors : bool</h3>
<p>This property holds whether to draw the background using alternating colors.</p>
<p>If this property is true, the item background will be drawn using <a href="qpalette.html#ColorRole-enum">QPalette::Base</a> and <a href="qpalette.html#ColorRole-enum">QPalette::AlternateBase</a>; otherwise the background will be drawn using the <a href="qpalette.html#ColorRole-enum">QPalette::Base</a> color.</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>alternatingRowColors</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAlternatingRowColors</b> ( bool <i>enable</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QAbstractItemView/hasAutoScroll"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setAutoScroll"></a>
<h3 class="fn"><a name="autoScroll-prop"></a>autoScroll : bool</h3>
<p>This property holds whether autoscrolling in drag move events is enabled.</p>
<p>If this property is set to true (the default), the <a href="qabstractitemview.html">QAbstractItemView</a> automatically scrolls the contents of the view if the user drags within 16 pixels of the viewport edge. If the current item changes, then the view will scroll automatically to ensure that the current item is fully visible.</p>
<p>This property only works if the viewport accepts drops. Autoscroll is switched off by setting this property to 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>hasAutoScroll</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAutoScroll</b> ( bool <i>enable</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QAbstractItemView/autoScrollMargin"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setAutoScrollMargin"></a>
<h3 class="fn"><a name="autoScrollMargin-prop"></a>autoScrollMargin : int</h3>
<p>This property holds the size of the area when auto scrolling is triggered.</p>
<p>This property controlls the size of the area at the edge of the viewport that triggers autoscrolling. The default value is 16 pixels.</p>
<p>This property was introduced in Qt 4.4.</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>autoScrollMargin</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAutoScrollMargin</b> ( int <i>margin</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QAbstractItemView/defaultDropAction"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setDefaultDropAction"></a>
<h3 class="fn"><a name="defaultDropAction-prop"></a>defaultDropAction : <a href="qt.html#DropAction-enum">Qt::DropAction</a></h3>
<p>This property holds the drop action that will be used by default in QAbstractItemView::drag().</p>
<p>If the property is not set, the drop action is CopyAction when the supported actions support CopyAction.</p>
<p>This property was introduced in Qt 4.6.</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">Qt::DropAction </td><td class="memItemRight" valign="bottom"><b>defaultDropAction</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setDefaultDropAction</b> ( Qt::DropAction <i>dropAction</i> )</td></tr>
</table>
<p>See also <a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a> and <a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dragDropMode"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setDragDropMode"></a>
<h3 class="fn"><a name="dragDropMode-prop"></a>dragDropMode : <a href="qabstractitemview.html#DragDropMode-enum">DragDropMode</a></h3>
<p>This property holds the drag and drop event the view will act upon.</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">DragDropMode </td><td class="memItemRight" valign="bottom"><b>dragDropMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setDragDropMode</b> ( DragDropMode <i>behavior</i> )</td></tr>
</table>
<p>See also <a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a> and <a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dragDropOverwriteMode"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setDragDropOverwriteMode"></a>
<h3 class="fn"><a name="dragDropOverwriteMode-prop"></a>dragDropOverwriteMode : bool</h3>
<p>This property holds the view's drag and drop behavior.</p>
<p>If its value is <tt>true</tt>, the selected data will overwrite the existing item data when dropped, while moving the data will clear the item. If its value is <tt>false</tt>, the selected data will be inserted as a new item when the data is dropped. When the data is moved, the item is removed as well.</p>
<p>The default value is <tt>false</tt>, as in the <a href="qlistview.html">QListView</a> and <a href="qtreeview.html">QTreeView</a> subclasses. In the <a href="qtableview.html">QTableView</a> subclass, on the other hand, the property has been set to <tt>true</tt>.</p>
<p>Note: This is not intended to prevent overwriting of items. The model's implementation of flags() should do that by not returning <a href="qt.html#ItemFlag-enum">Qt::ItemIsDropEnabled</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>dragDropOverwriteMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setDragDropOverwriteMode</b> ( bool <i>overwrite</i> )</td></tr>
</table>
<p>See also <a href="qabstractitemview.html#dragDropMode-prop">dragDropMode</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dragEnabled"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setDragEnabled"></a>
<h3 class="fn"><a name="dragEnabled-prop"></a>dragEnabled : bool</h3>
<p>This property holds whether the view supports dragging of its own items.</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>dragEnabled</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setDragEnabled</b> ( bool <i>enable</i> )</td></tr>
</table>
<p>See also <a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a>, <a href="qabstractitemview.html#DragDropMode-enum">DragDropMode</a>, <a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a>, and <a href="qwidget.html#acceptDrops-prop">acceptDrops</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/editTriggers"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setEditTriggers"></a>
<h3 class="fn"><a name="editTriggers-prop"></a>editTriggers : <a href="qabstractitemview.html#EditTrigger-enum">EditTriggers</a></h3>
<p>This property holds which actions will initiate item editing.</p>
<p>This property is a selection of flags defined by <a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a>, combined using the OR operator. The view will only initiate the editing of an item if the action performed is set in this property.</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">EditTriggers </td><td class="memItemRight" valign="bottom"><b>editTriggers</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setEditTriggers</b> ( EditTriggers <i>triggers</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QAbstractItemView/horizontalScrollMode"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setHorizontalScrollMode"></a>
<h3 class="fn"><a name="horizontalScrollMode-prop"></a>horizontalScrollMode : <a href="qabstractitemview.html#ScrollMode-enum">ScrollMode</a></h3>
<p>This property holds how the view scrolls its contents in the horizontal direction.</p>
<p>This property controlls how the view scroll its contents horizontally. Scrolling can be done either per pixel or per item.</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">ScrollMode </td><td class="memItemRight" valign="bottom"><b>horizontalScrollMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setHorizontalScrollMode</b> ( ScrollMode <i>mode</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QAbstractItemView/iconSize"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setIconSize"></a>
<h3 class="fn"><a name="iconSize-prop"></a>iconSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds the size of items' icons.</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>iconSize</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setIconSize</b> ( const QSize &amp; <i>size</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QAbstractItemView/selectionBehavior"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setSelectionBehavior"></a>
<h3 class="fn"><a name="selectionBehavior-prop"></a>selectionBehavior : <a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a></h3>
<p>This property holds which selection behavior the view uses.</p>
<p>This property holds whether selections are done in terms of single items, rows or columns.</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">QAbstractItemView::SelectionBehavior </td><td class="memItemRight" valign="bottom"><b>selectionBehavior</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSelectionBehavior</b> ( QAbstractItemView::SelectionBehavior <i>behavior</i> )</td></tr>
</table>
<p>See also <a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a> and <a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/selectionMode"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setSelectionMode"></a>
<h3 class="fn"><a name="selectionMode-prop"></a>selectionMode : <a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a></h3>
<p>This property holds which selection mode the view operates in.</p>
<p>This property controls whether the user can select one or many items and, in many-item selections, whether the selection must be a continuous range of items.</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">QAbstractItemView::SelectionMode </td><td class="memItemRight" valign="bottom"><b>selectionMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSelectionMode</b> ( QAbstractItemView::SelectionMode <i>mode</i> )</td></tr>
</table>
<p>See also <a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a> and <a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/showDropIndicator"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setDropIndicatorShown"></a>
<h3 class="fn"><a name="showDropIndicator-prop"></a>showDropIndicator : bool</h3>
<p>This property holds whether the drop indicator is shown when dragging items and dropping.</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>showDropIndicator</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setDropIndicatorShown</b> ( bool <i>enable</i> )</td></tr>
</table>
<p>See also <a href="qabstractitemview.html#dragEnabled-prop">dragEnabled</a>, <a href="qabstractitemview.html#DragDropMode-enum">DragDropMode</a>, <a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a>, and <a href="qwidget.html#acceptDrops-prop">acceptDrops</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/tabKeyNavigation"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setTabKeyNavigation"></a>
<h3 class="fn"><a name="tabKeyNavigation-prop"></a>tabKeyNavigation : bool</h3>
<p>This property holds whether item navigation with tab and backtab is 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">bool </td><td class="memItemRight" valign="bottom"><b>tabKeyNavigation</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setTabKeyNavigation</b> ( bool <i>enable</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QAbstractItemView/textElideMode"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setTextElideMode"></a>
<h3 class="fn"><a name="textElideMode-prop"></a>textElideMode : <a href="qt.html#TextElideMode-enum">Qt::TextElideMode</a></h3>
<p>This property holds the position of the "..." in elided text.</p>
<p>The default value for all item views is <a href="qt.html#TextElideMode-enum">Qt::ElideRight</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">Qt::TextElideMode </td><td class="memItemRight" valign="bottom"><b>textElideMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setTextElideMode</b> ( Qt::TextElideMode <i>mode</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QAbstractItemView/verticalScrollMode"></a>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setVerticalScrollMode"></a>
<h3 class="fn"><a name="verticalScrollMode-prop"></a>verticalScrollMode : <a href="qabstractitemview.html#ScrollMode-enum">ScrollMode</a></h3>
<p>This property holds how the view scrolls its contents in the vertical direction.</p>
<p>This property controlls how the view scroll its contents vertically. Scrolling can be done either per pixel or per item.</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">ScrollMode </td><td class="memItemRight" valign="bottom"><b>verticalScrollMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setVerticalScrollMode</b> ( ScrollMode <i>mode</i> )</td></tr>
</table>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QAbstractItemView/QAbstractItemView"></a>
<h3 class="fn"><a name="QAbstractItemView"></a>QAbstractItemView::QAbstractItemView ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
<p>Constructs an abstract item view with the given <i>parent</i>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/~QAbstractItemView"></a>
<h3 class="fn"><a name="dtor.QAbstractItemView"></a>QAbstractItemView::~QAbstractItemView ()</h3>
<p>Destroys the view.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/activated"></a>
<h3 class="fn"><a name="activated"></a>void QAbstractItemView::activated ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the item specified by <i>index</i> is activated by the user. How to activate items depends on the platform; e.g&#x2e;, by single- or double-clicking the item, or by pressing the Return or Enter key when the item is current.</p>
<p>See also <a href="qabstractitemview.html#clicked">clicked</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), <a href="qabstractitemview.html#entered">entered</a>(), and <a href="qabstractitemview.html#pressed">pressed</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/clearSelection"></a>
<h3 class="fn"><a name="clearSelection"></a>void QAbstractItemView::clearSelection ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Deselects all selected items. The current index will not be changed.</p>
<p>See also <a href="qabstractitemview.html#setSelection">setSelection</a>() and <a href="qabstractitemview.html#selectAll">selectAll</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/clicked"></a>
<h3 class="fn"><a name="clicked"></a>void QAbstractItemView::clicked ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when a mouse button is clicked. The item the mouse was clicked on is specified by <i>index</i>. The signal is only emitted when the index is valid.</p>
<p>See also <a href="qabstractitemview.html#activated">activated</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), <a href="qabstractitemview.html#entered">entered</a>(), and <a href="qabstractitemview.html#pressed">pressed</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/closeEditor"></a>
<h3 class="fn"><a name="closeEditor"></a>void QAbstractItemView::closeEditor ( <a href="qwidget.html">QWidget</a> * <i>editor</i>, <a href="qabstractitemdelegate.html#EndEditHint-enum">QAbstractItemDelegate::EndEditHint</a> <i>hint</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
<p>Closes the given <i>editor</i>, and releases it. The <i>hint</i> is used to specify how the view should respond to the end of the editing operation. For example, the hint may indicate that the next item in the view should be opened for editing.</p>
<p>See also <a href="qabstractitemview.html#edit">edit</a>() and <a href="qabstractitemview.html#commitData">commitData</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/closePersistentEditor"></a>
<h3 class="fn"><a name="closePersistentEditor"></a>void QAbstractItemView::closePersistentEditor ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )</h3>
<p>Closes the persistent editor for the item at the given <i>index</i>.</p>
<p>See also <a href="qabstractitemview.html#openPersistentEditor">openPersistentEditor</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/commitData"></a>
<h3 class="fn"><a name="commitData"></a>void QAbstractItemView::commitData ( <a href="qwidget.html">QWidget</a> * <i>editor</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
<p>Commit the data in the <i>editor</i> to the model.</p>
<p>See also <a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/currentChanged"></a>
<h3 class="fn"><a name="currentChanged"></a>void QAbstractItemView::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 slot]</tt></h3>
<p>This slot is called when a new item becomes the current item. The previous current item is specified by the <i>previous</i> index, and the new item by the <i>current</i> index.</p>
<p>If you want to know about changes to items see the <a href="qabstractitemview.html#dataChanged">dataChanged</a>() signal.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/currentIndex"></a>
<h3 class="fn"><a name="currentIndex"></a><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView::currentIndex () const</h3>
<p>Returns the model index of the current item.</p>
<p>See also <a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dataChanged"></a>
<h3 class="fn"><a name="dataChanged"></a>void QAbstractItemView::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 slot]</tt></h3>
<p>This slot is called when items are changed in the model. The changed items are those from <i>topLeft</i> to <i>bottomRight</i> inclusive. If just one item is changed <i>topLeft</i> == <i>bottomRight</i>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dirtyRegionOffset"></a>
<h3 class="fn"><a name="dirtyRegionOffset"></a><a href="qpoint.html">QPoint</a> QAbstractItemView::dirtyRegionOffset () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Returns the offset of the dirty regions in the view.</p>
<p>If you use <a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>() and implement a <a href="qabstractscrollarea.html#paintEvent">paintEvent</a>() in a subclass of <a href="qabstractitemview.html">QAbstractItemView</a>, you should translate the area given by the paint event with the offset returned from this function.</p>
<p>See also <a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>() and <a href="qabstractitemview.html#setDirtyRegion">setDirtyRegion</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/doubleClicked"></a>
<h3 class="fn"><a name="doubleClicked"></a>void QAbstractItemView::doubleClicked ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by <i>index</i>. The signal is only emitted when the index is valid.</p>
<p>See also <a href="qabstractitemview.html#clicked">clicked</a>() and <a href="qabstractitemview.html#activated">activated</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dragEnterEvent"></a>
<h3 class="fn"><a name="dragEnterEvent"></a>void QAbstractItemView::dragEnterEvent ( <a href="qdragenterevent.html">QDragEnterEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dragEnterEvent">QWidget::dragEnterEvent</a>().</p>
<p>This function is called with the given <i>event</i> when a drag and drop operation enters the widget. If the drag is over a valid dropping place (e.g&#x2e; over an item that accepts drops), the event is accepted; otherwise it is ignored.</p>
<p>See also <a href="qabstractitemview.html#dropEvent">dropEvent</a>() and <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dragLeaveEvent"></a>
<h3 class="fn"><a name="dragLeaveEvent"></a>void QAbstractItemView::dragLeaveEvent ( <a href="qdragleaveevent.html">QDragLeaveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dragLeaveEvent">QWidget::dragLeaveEvent</a>().</p>
<p>This function is called when the item being dragged leaves the view. The <i>event</i> describes the state of the drag and drop operation.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dragMoveEvent"></a>
<h3 class="fn"><a name="dragMoveEvent"></a>void QAbstractItemView::dragMoveEvent ( <a href="qdragmoveevent.html">QDragMoveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dragMoveEvent">QWidget::dragMoveEvent</a>().</p>
<p>This function is called continuously with the given <i>event</i> during a drag and drop operation over the widget. It can cause the view to scroll if, for example, the user drags a selection to view's right or bottom edge. In this case, the event will be accepted; otherwise it will be ignored.</p>
<p>See also <a href="qabstractitemview.html#dropEvent">dropEvent</a>() and <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dropEvent"></a>
<h3 class="fn"><a name="dropEvent"></a>void QAbstractItemView::dropEvent ( <a href="qdropevent.html">QDropEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dropEvent">QWidget::dropEvent</a>().</p>
<p>This function is called with the given <i>event</i> when a drop event occurs over the widget. If the model accepts the even position the drop event is accepted; otherwise it is ignored.</p>
<p>See also <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/dropIndicatorPosition"></a>
<h3 class="fn"><a name="dropIndicatorPosition"></a><a href="qabstractitemview.html#DropIndicatorPosition-enum">DropIndicatorPosition</a> QAbstractItemView::dropIndicatorPosition () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Returns the position of the drop indicator in relation to the closest item.</p>
<p>This function was introduced in Qt 4.1.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/edit"></a>
<h3 class="fn"><a name="edit"></a>void QAbstractItemView::edit ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Starts editing the item corresponding to the given <i>index</i> if it is editable.</p>
<p>Note that this function does not change the current index. Since the current index defines the next and previous items to edit, users may find that keyboard navigation does not work as expected. To provide consistent navigation behavior, call <a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a>() before this function with the same model index.</p>
<p>See also <a href="qmodelindex.html#flags">QModelIndex::flags</a>().</p>
<h3 class="fn"><a name="edit-2"></a>bool QAbstractItemView::edit ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i>, <a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a> <i>trigger</i>, <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Starts editing the item at <i>index</i>, creating an editor if necessary, and returns true if the view's <a href="qabstractitemview.html#State-enum">State</a> is now <a href="qabstractitemview.html#State-enum">EditingState</a>; otherwise returns false.</p>
<p>The action that caused the editing process is described by <i>trigger</i>, and the associated event is specified by <i>event</i>.</p>
<p>Editing can be forced by specifying the <i>trigger</i> to be <a href="qabstractitemview.html#EditTrigger-enum">QAbstractItemView::AllEditTriggers</a>.</p>
<p>See also <a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/editorDestroyed"></a>
<h3 class="fn"><a name="editorDestroyed"></a>void QAbstractItemView::editorDestroyed ( <a href="qobject.html">QObject</a> * <i>editor</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
<p>This function is called when the given <i>editor</i> has been destroyed.</p>
<p>See also <a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/entered"></a>
<h3 class="fn"><a name="entered"></a>void QAbstractItemView::entered ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the mouse cursor enters the item specified by <i>index</i>. Mouse tracking needs to be enabled for this feature to work.</p>
<p>See also <a href="qabstractitemview.html#viewportEntered">viewportEntered</a>(), <a href="qabstractitemview.html#activated">activated</a>(), <a href="qabstractitemview.html#clicked">clicked</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), and <a href="qabstractitemview.html#pressed">pressed</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/event"></a>
<h3 class="fn"><a name="event"></a>bool QAbstractItemView::event ( <a href="qevent.html">QEvent</a> * <i>event</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/QAbstractItemView/executeDelayedItemsLayout"></a>
<h3 class="fn"><a name="executeDelayedItemsLayout"></a>void QAbstractItemView::executeDelayedItemsLayout ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Executes the scheduled layouts without waiting for the event processing to begin.</p>
<p>See also <a href="qabstractitemview.html#scheduleDelayedItemsLayout">scheduleDelayedItemsLayout</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/focusInEvent"></a>
<h3 class="fn"><a name="focusInEvent"></a>void QAbstractItemView::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget::focusInEvent</a>().</p>
<p>This function is called with the given <i>event</i> when the widget obtains the focus. By default, the event is ignored.</p>
<p>See also <a href="qwidget.html#setFocus">setFocus</a>() and <a href="qabstractitemview.html#focusOutEvent">focusOutEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/focusNextPrevChild"></a>
<h3 class="fn"><a name="focusNextPrevChild"></a>bool QAbstractItemView::focusNextPrevChild ( bool <i>next</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusNextPrevChild">QWidget::focusNextPrevChild</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/focusOutEvent"></a>
<h3 class="fn"><a name="focusOutEvent"></a>void QAbstractItemView::focusOutEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget::focusOutEvent</a>().</p>
<p>This function is called with the given <i>event</i> when the widget looses the focus. By default, the event is ignored.</p>
<p>See also <a href="qwidget.html#clearFocus">clearFocus</a>() and <a href="qabstractitemview.html#focusInEvent">focusInEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/horizontalOffset"></a>
<h3 class="fn"><a name="horizontalOffset"></a>int QAbstractItemView::horizontalOffset () const&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
<p>Returns the horizontal offset of the view.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractitemview.html#verticalOffset">verticalOffset</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/indexAt"></a>
<h3 class="fn"><a name="indexAt"></a><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView::indexAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>point</i> ) const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Returns the model index of the item at the viewport coordinates <i>point</i>.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractitemview.html#visualRect">visualRect</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/indexWidget"></a>
<h3 class="fn"><a name="indexWidget"></a><a href="qwidget.html">QWidget</a> * QAbstractItemView::indexWidget ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const</h3>
<p>Returns the widget for the item at the given <i>index</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qabstractitemview.html#setIndexWidget">setIndexWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/inputMethodEvent"></a>
<h3 class="fn"><a name="inputMethodEvent"></a>void QAbstractItemView::inputMethodEvent ( <a href="qinputmethodevent.html">QInputMethodEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodEvent">QWidget::inputMethodEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/inputMethodQuery"></a>
<h3 class="fn"><a name="inputMethodQuery"></a><a href="qvariant.html">QVariant</a> QAbstractItemView::inputMethodQuery ( <a href="qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a> <i>query</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodQuery">QWidget::inputMethodQuery</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/isIndexHidden"></a>
<h3 class="fn"><a name="isIndexHidden"></a>bool QAbstractItemView::isIndexHidden ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
<p>Returns true if the item referred to by the given <i>index</i> is hidden in the view, otherwise returns false.</p>
<p>Hiding is a view specific feature. For example in TableView a column can be marked as hidden or a row in the TreeView.</p>
<p>In the base class this is a pure virtual function.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/itemDelegate"></a>
<h3 class="fn"><a name="itemDelegate"></a><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * QAbstractItemView::itemDelegate () const</h3>
<p>Returns the item delegate used by this view and model. This is either one set with <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>(), or the default one.</p>
<p>See also <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>().</p>
<h3 class="fn"><a name="itemDelegate-2"></a><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * QAbstractItemView::itemDelegate ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const</h3>
<p>Returns the item delegate used by this view and model for the given <i>index</i>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/itemDelegateForColumn"></a>
<h3 class="fn"><a name="itemDelegateForColumn"></a><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * QAbstractItemView::itemDelegateForColumn ( int <i>column</i> ) const</h3>
<p>Returns the item delegate used by this view and model for the given <i>column</i>. You can call <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>() to get a pointer to the current delegate for a given index.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qabstractitemview.html#setItemDelegateForColumn">setItemDelegateForColumn</a>(), <a href="qabstractitemview.html#itemDelegateForRow">itemDelegateForRow</a>(), and <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/itemDelegateForRow"></a>
<h3 class="fn"><a name="itemDelegateForRow"></a><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * QAbstractItemView::itemDelegateForRow ( int <i>row</i> ) const</h3>
<p>Returns the item delegate used by this view and model for the given <i>row</i>, or 0 if no delegate has been assigned. You can call <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>() to get a pointer to the current delegate for a given index.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qabstractitemview.html#setItemDelegateForRow">setItemDelegateForRow</a>(), <a href="qabstractitemview.html#itemDelegateForColumn">itemDelegateForColumn</a>(), and <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/keyPressEvent"></a>
<h3 class="fn"><a name="keyPressEvent"></a>void QAbstractItemView::keyPressEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<p>This function is called with the given <i>event</i> when a key event is sent to the widget. The default implementation handles basic cursor movement, e.g&#x2e; Up, Down, Left, Right, Home, PageUp, and PageDown; the <a href="qabstractitemview.html#activated">activated</a>() signal is emitted if the current index is valid and the activation key is pressed (e.g&#x2e; Enter or Return, depending on the platform). This function is where editing is initiated by key press, e.g&#x2e; if F2 is pressed.</p>
<p>See also <a href="qabstractitemview.html#edit">edit</a>(), <a href="qabstractitemview.html#moveCursor">moveCursor</a>(), <a href="qabstractitemview.html#keyboardSearch">keyboardSearch</a>(), and <a href="qabstractitemview.html#tabKeyNavigation-prop">tabKeyNavigation</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/keyboardSearch"></a>
<h3 class="fn"><a name="keyboardSearch"></a>void QAbstractItemView::keyboardSearch ( const <a href="qstring.html">QString</a> &amp; <i>search</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Moves to and selects the item best matching the string <i>search</i>. If no item is found nothing happens.</p>
<p>In the default implementation, the search is reset if <i>search</i> is empty, or the time interval since the last search has exceeded <a href="qapplication.html#keyboardInputInterval-prop">QApplication::keyboardInputInterval</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/model"></a>
<h3 class="fn"><a name="model"></a><a href="qabstractitemmodel.html">QAbstractItemModel</a> * QAbstractItemView::model () const</h3>
<p>Returns the model that this view is presenting.</p>
<p>See also <a href="qabstractitemview.html#setModel">setModel</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/mouseDoubleClickEvent"></a>
<h3 class="fn"><a name="mouseDoubleClickEvent"></a>void QAbstractItemView::mouseDoubleClickEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseDoubleClickEvent">QWidget::mouseDoubleClickEvent</a>().</p>
<p>This function is called with the given <i>event</i> when a mouse button is double clicked inside the widget. If the double-click is on a valid item it emits the <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>() signal and calls <a href="qabstractitemview.html#edit">edit</a>() on the item.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/mouseMoveEvent"></a>
<h3 class="fn"><a name="mouseMoveEvent"></a>void QAbstractItemView::mouseMoveEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget::mouseMoveEvent</a>().</p>
<p>This function is called with the given <i>event</i> when a mouse move event is sent to the widget. If a selection is in progress and new items are moved over the selection is extended; if a drag is in progress it is continued.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/mousePressEvent"></a>
<h3 class="fn"><a name="mousePressEvent"></a>void QAbstractItemView::mousePressEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget::mousePressEvent</a>().</p>
<p>This function is called with the given <i>event</i> when a mouse button is pressed while the cursor is inside the widget. If a valid item is pressed on it is made into the current item. This function emits the <a href="qabstractitemview.html#pressed">pressed</a>() signal.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/mouseReleaseEvent"></a>
<h3 class="fn"><a name="mouseReleaseEvent"></a>void QAbstractItemView::mouseReleaseEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget::mouseReleaseEvent</a>().</p>
<p>This function is called with the given <i>event</i> when a mouse button is released, after a mouse press event on the widget. If a user presses the mouse inside your widget and then drags the mouse to another location before releasing the mouse button, your widget receives the release event. The function will emit the <a href="qabstractitemview.html#clicked">clicked</a>() signal if an item was being pressed.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/moveCursor"></a>
<h3 class="fn"><a name="moveCursor"></a><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView::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> [pure virtual protected]</tt></h3>
<p>Returns a <a href="qmodelindex.html">QModelIndex</a> object pointing to the next object in the view, based on the given <i>cursorAction</i> and keyboard modifiers specified by <i>modifiers</i>.</p>
<p>In the base class this is a pure virtual function.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/openPersistentEditor"></a>
<h3 class="fn"><a name="openPersistentEditor"></a>void QAbstractItemView::openPersistentEditor ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )</h3>
<p>Opens a persistent editor on the item at the given <i>index</i>. If no editor exists, the delegate will create a new editor.</p>
<p>See also <a href="qabstractitemview.html#closePersistentEditor">closePersistentEditor</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/pressed"></a>
<h3 class="fn"><a name="pressed"></a>void QAbstractItemView::pressed ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by <i>index</i>. The signal is only emitted when the index is valid.</p>
<p>Use the <a href="qapplication.html#mouseButtons">QApplication::mouseButtons</a>() function to get the state of the mouse buttons.</p>
<p>See also <a href="qabstractitemview.html#activated">activated</a>(), <a href="qabstractitemview.html#clicked">clicked</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), and <a href="qabstractitemview.html#entered">entered</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/reset"></a>
<h3 class="fn"><a name="reset"></a>void QAbstractItemView::reset ()&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
<p>Reset the internal state of the view.</p>
<p><b>Warning:</b> This function will reset open editors, scroll bar positions, selections, etc. Existing changes will not be committed. If you would like to save your changes when resetting the view, you can reimplement this function, commit your changes, and then call the superclass' implementation.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/resizeEvent"></a>
<h3 class="fn"><a name="resizeEvent"></a>void QAbstractItemView::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<p>This function is called with the given <i>event</i> when a resize event is sent to the widget.</p>
<p>See also <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/rootIndex"></a>
<h3 class="fn"><a name="rootIndex"></a><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView::rootIndex () const</h3>
<p>Returns the model index of the model's root item. The root item is the parent item to the view's toplevel items. The root can be invalid.</p>
<p>See also <a href="qabstractitemview.html#setRootIndex">setRootIndex</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/rowsAboutToBeRemoved"></a>
<h3 class="fn"><a name="rowsAboutToBeRemoved"></a>void QAbstractItemView::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 slot]</tt></h3>
<p>This slot is called when rows are about to be removed. The deleted rows are those under the given <i>parent</i> from <i>start</i> to <i>end</i> inclusive.</p>
<p>See also <a href="qabstractitemview.html#rowsInserted">rowsInserted</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/rowsInserted"></a>
<h3 class="fn"><a name="rowsInserted"></a>void QAbstractItemView::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 slot]</tt></h3>
<p>This slot is called when rows are inserted. The new rows are those under the given <i>parent</i> from <i>start</i> to <i>end</i> inclusive. The base class implementation calls fetchMore() on the model to check for more data.</p>
<p>See also <a href="qabstractitemview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/scheduleDelayedItemsLayout"></a>
<h3 class="fn"><a name="scheduleDelayedItemsLayout"></a>void QAbstractItemView::scheduleDelayedItemsLayout ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Schedules a layout of the items in the view to be executed when the event processing starts.</p>
<p>Even if scheduleDelayedItemsLayout() is called multiple times before events are processed, the view will only do the layout once.</p>
<p>See also <a href="qabstractitemview.html#executeDelayedItemsLayout">executeDelayedItemsLayout</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/scrollDirtyRegion"></a>
<h3 class="fn"><a name="scrollDirtyRegion"></a>void QAbstractItemView::scrollDirtyRegion ( int <i>dx</i>, int <i>dy</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Prepares the view for scrolling by (<i>dx</i>,<i>dy</i>) pixels by moving the dirty regions in the opposite direction. You only need to call this function if you are implementing a scrolling viewport in your view subclass.</p>
<p>If you implement <a href="qabstractscrollarea.html#scrollContentsBy">scrollContentsBy</a>() in a subclass of <a href="qabstractitemview.html">QAbstractItemView</a>, call this function before you call <a href="qwidget.html#scroll">QWidget::scroll</a>() on the viewport. Alternatively, just call <a href="qabstractitemview.html#update">update</a>().</p>
<p>See also <a href="qabstractscrollarea.html#scrollContentsBy">scrollContentsBy</a>(), <a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a>(), and <a href="qabstractitemview.html#setDirtyRegion">setDirtyRegion</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/scrollTo"></a>
<h3 class="fn"><a name="scrollTo"></a>void QAbstractItemView::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> [pure virtual]</tt></h3>
<p>Scrolls the view if necessary to ensure that the item at <i>index</i> is visible. The view will try to position the item according to the given <i>hint</i>.</p>
<p>In the base class this is a pure virtual function.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/scrollToBottom"></a>
<h3 class="fn"><a name="scrollToBottom"></a>void QAbstractItemView::scrollToBottom ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Scrolls the view to the bottom.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qabstractitemview.html#scrollTo">scrollTo</a>() and <a href="qabstractitemview.html#scrollToTop">scrollToTop</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/scrollToTop"></a>
<h3 class="fn"><a name="scrollToTop"></a>void QAbstractItemView::scrollToTop ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Scrolls the view to the top.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qabstractitemview.html#scrollTo">scrollTo</a>() and <a href="qabstractitemview.html#scrollToBottom">scrollToBottom</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/selectAll"></a>
<h3 class="fn"><a name="selectAll"></a>void QAbstractItemView::selectAll ()&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
<p>Selects all items in the view. This function will use the selection behavior set on the view when selecting.</p>
<p>See also <a href="qabstractitemview.html#setSelection">setSelection</a>(), <a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a>(), and <a href="qabstractitemview.html#clearSelection">clearSelection</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/selectedIndexes"></a>
<h3 class="fn"><a name="selectedIndexes"></a><a href="qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a> QAbstractItemView::selectedIndexes () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This convenience function returns a list of all selected and non-hidden item indexes in the view. The list contains no duplicates, and is not sorted.</p>
<p>See also <a href="qitemselectionmodel.html#selectedIndexes">QItemSelectionModel::selectedIndexes</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/selectionChanged"></a>
<h3 class="fn"><a name="selectionChanged"></a>void QAbstractItemView::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 slot]</tt></h3>
<p>This slot is called when the selection is changed. The previous selection (which may be empty), is specified by <i>deselected</i>, and the new selection by <i>selected</i>.</p>
<p>See also <a href="qabstractitemview.html#setSelection">setSelection</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/selectionCommand"></a>
<h3 class="fn"><a name="selectionCommand"></a><a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a> QAbstractItemView::selectionCommand ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i>, const <a href="qevent.html">QEvent</a> * <i>event</i> = 0 ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Returns the SelectionFlags to be used when updating a selection with to include the <i>index</i> specified. The <i>event</i> is a user input event, such as a mouse or keyboard event.</p>
<p>Reimplement this function to define your own selection behavior.</p>
<p>See also <a href="qabstractitemview.html#setSelection">setSelection</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/selectionModel"></a>
<h3 class="fn"><a name="selectionModel"></a><a href="qitemselectionmodel.html">QItemSelectionModel</a> * QAbstractItemView::selectionModel () const</h3>
<p>Returns the current selection model.</p>
<p>See also <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>() and <a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setCurrentIndex"></a>
<h3 class="fn"><a name="setCurrentIndex"></a>void QAbstractItemView::setCurrentIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Sets the current item to be the item at <i>index</i>.</p>
<p>Unless the current selection mode is <a href="qabstractitemview.html#SelectionMode-enum">NoSelection</a>, the item is also be selected. Note that this function also updates the starting position for any new selections the user performs.</p>
<p>To set an item as the current item without selecting it, call</p>
<p><tt>selectionModel()-&gt;setCurrentIndex(index, QItemSelectionModel::NoUpdate);</tt></p>
<p>See also <a href="qabstractitemview.html#currentIndex">currentIndex</a>(), <a href="qabstractitemview.html#currentChanged">currentChanged</a>(), and <a href="qabstractitemview.html#selectionMode-prop">selectionMode</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setDirtyRegion"></a>
<h3 class="fn"><a name="setDirtyRegion"></a>void QAbstractItemView::setDirtyRegion ( const <a href="qregion.html">QRegion</a> &amp; <i>region</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Marks the given <i>region</i> as dirty and schedules it to be updated. You only need to call this function if you are implementing your own view subclass.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>() and <a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setIndexWidget"></a>
<h3 class="fn"><a name="setIndexWidget"></a>void QAbstractItemView::setIndexWidget ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i>, <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3>
<p>Sets the given <i>widget</i> on the item at the given <i>index</i>, passing the ownership of the widget to the viewport.</p>
<p>If <i>index</i> is invalid (e.g&#x2e;, if you pass the root index), this function will do nothing.</p>
<p>The given <i>widget</i>'s <a href="qwidget.html">autoFillBackground</a> property must be set to true, otherwise the widget's background will be transparent, showing both the model data and the item at the given <i>index</i>.</p>
<p>If index widget A is replaced with index widget B, index widget A will be deleted. For example, in the code snippet below, the <a href="qlineedit.html">QLineEdit</a> object will be deleted.</p>
<pre> setIndexWidget(index, new QLineEdit);
 ...
 setIndexWidget(index, new QTextEdit);</pre>
<p>This function should only be used to display static content within the visible area corresponding to an item of data. If you want to display custom dynamic content or implement a custom editor widget, subclass <a href="qitemdelegate.html">QItemDelegate</a> instead.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qabstractitemview.html#indexWidget">indexWidget</a>() and <a href="model-view-delegate.html">Delegate Classes</a>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setItemDelegate"></a>
<h3 class="fn"><a name="setItemDelegate"></a>void QAbstractItemView::setItemDelegate ( <a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * <i>delegate</i> )</h3>
<p>Sets the item delegate for this view and its model to <i>delegate</i>. This is useful if you want complete control over the editing and display of items.</p>
<p>Any existing delegate will be removed, but not deleted. <a href="qabstractitemview.html">QAbstractItemView</a> does not take ownership of <i>delegate</i>.</p>
<p><b>Warning:</b> You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the <a href="qabstractitemdelegate.html#closeEditor">closeEditor()</a> signal, and attempt to access, modify or close an editor that has already been closed.</p>
<p>See also <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setItemDelegateForColumn"></a>
<h3 class="fn"><a name="setItemDelegateForColumn"></a>void QAbstractItemView::setItemDelegateForColumn ( int <i>column</i>, <a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * <i>delegate</i> )</h3>
<p>Sets the given item <i>delegate</i> used by this view and model for the given <i>column</i>. All items on <i>column</i> will be drawn and managed by <i>delegate</i> instead of using the default delegate (i.e&#x2e;, <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>()).</p>
<p>Any existing column delegate for <i>column</i> will be removed, but not deleted. <a href="qabstractitemview.html">QAbstractItemView</a> does not take ownership of <i>delegate</i>.</p>
<p><b>Note:</b> If a delegate has been assigned to both a row and a column, the row delegate will take presedence and manage the intersecting cell index.</p>
<p><b>Warning:</b> You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the <a href="qabstractitemdelegate.html#closeEditor">closeEditor()</a> signal, and attempt to access, modify or close an editor that has already been closed.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qabstractitemview.html#itemDelegateForColumn">itemDelegateForColumn</a>(), <a href="qabstractitemview.html#setItemDelegateForRow">setItemDelegateForRow</a>(), and <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setItemDelegateForRow"></a>
<h3 class="fn"><a name="setItemDelegateForRow"></a>void QAbstractItemView::setItemDelegateForRow ( int <i>row</i>, <a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * <i>delegate</i> )</h3>
<p>Sets the given item <i>delegate</i> used by this view and model for the given <i>row</i>. All items on <i>row</i> will be drawn and managed by <i>delegate</i> instead of using the default delegate (i.e&#x2e;, <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>()).</p>
<p>Any existing row delegate for <i>row</i> will be removed, but not deleted. <a href="qabstractitemview.html">QAbstractItemView</a> does not take ownership of <i>delegate</i>.</p>
<p><b>Note:</b> If a delegate has been assigned to both a row and a column, the row delegate (i.e&#x2e;, this delegate) will take presedence and manage the intersecting cell index.</p>
<p><b>Warning:</b> You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the <a href="qabstractitemdelegate.html#closeEditor">closeEditor()</a> signal, and attempt to access, modify or close an editor that has already been closed.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qabstractitemview.html#itemDelegateForRow">itemDelegateForRow</a>(), <a href="qabstractitemview.html#setItemDelegateForColumn">setItemDelegateForColumn</a>(), and <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setModel"></a>
<h3 class="fn"><a name="setModel"></a>void QAbstractItemView::setModel ( <a href="qabstractitemmodel.html">QAbstractItemModel</a> * <i>model</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Sets the <i>model</i> for the view to present.</p>
<p>This function will create and set a new selection model, replacing any model that was previously set with <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>(). However, the old selection model will not be deleted as it may be shared between several views. We recommend that you delete the old selection model if it is no longer required. This is done with the following code:</p>
<pre> QItemSelectionModel *m = view-&gt;selectionModel();
 view-&gt;setModel(new model);
 delete m;</pre>
<p>If both the old model and the old selection model do not have parents, or if their parents are long-lived objects, it may be preferable to call their <a href="qobject.html#deleteLater">deleteLater</a>() functions to explicitly delete them.</p>
<p>The view <i>does not</i> take ownership of the model unless it is the model's parent object because the view may be shared between many different views.</p>
<p>See also <a href="qabstractitemview.html#model">model</a>(), <a href="qabstractitemview.html#selectionModel">selectionModel</a>(), and <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setRootIndex"></a>
<h3 class="fn"><a name="setRootIndex"></a>void QAbstractItemView::setRootIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
<p>Sets the root item to the item at the given <i>index</i>.</p>
<p>See also <a href="qabstractitemview.html#rootIndex">rootIndex</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setSelection"></a>
<h3 class="fn"><a name="setSelection"></a>void QAbstractItemView::setSelection ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i>, <a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a> <i>flags</i> )&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
<p>Applies the selection <i>flags</i> to the items in or touched by the rectangle, <i>rect</i>.</p>
<p>When implementing your own itemview setSelection should call <a href="qabstractitemview.html#selectionModel">selectionModel</a>()-&gt;select(selection, flags) where selection is either an empty <a href="qmodelindex.html">QModelIndex</a> or a <a href="qitemselection.html">QItemSelection</a> that contains all items that are contained in <i>rect</i>.</p>
<p>See also <a href="qabstractitemview.html#selectionCommand">selectionCommand</a>() and <a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setSelectionModel"></a>
<h3 class="fn"><a name="setSelectionModel"></a>void QAbstractItemView::setSelectionModel ( <a href="qitemselectionmodel.html">QItemSelectionModel</a> * <i>selectionModel</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Sets the current selection model to the given <i>selectionModel</i>.</p>
<p>Note that, if you call <a href="qabstractitemview.html#setModel">setModel</a>() after this function, the given <i>selectionModel</i> will be replaced by one created by the view.</p>
<p><b>Note:</b> It is up to the application to delete the old selection model if it is no longer needed; i.e&#x2e;, if it is not being used by other views. This will happen automatically when its parent object is deleted. However, if it does not have a parent, or if the parent is a long-lived object, it may be preferable to call its <a href="qobject.html#deleteLater">deleteLater</a>() function to explicitly delete it.</p>
<p>See also <a href="qabstractitemview.html#selectionModel">selectionModel</a>(), <a href="qabstractitemview.html#setModel">setModel</a>(), and <a href="qabstractitemview.html#clearSelection">clearSelection</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/setState"></a>
<h3 class="fn"><a name="setState"></a>void QAbstractItemView::setState ( <a href="qabstractitemview.html#State-enum">State</a> <i>state</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Sets the item view's state to the given <i>state</i>.</p>
<p>See also <a href="qabstractitemview.html#state">state</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/sizeHintForColumn"></a>
<h3 class="fn"><a name="sizeHintForColumn"></a>int QAbstractItemView::sizeHintForColumn ( int <i>column</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the width size hint for the specified <i>column</i> or -1 if there is no model.</p>
<p>This function is used in views with a horizontal header to find the size hint for a header section based on the contents of the given <i>column</i>.</p>
<p>See also <a href="qabstractitemview.html#sizeHintForRow">sizeHintForRow</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/sizeHintForIndex"></a>
<h3 class="fn"><a name="sizeHintForIndex"></a><a href="qsize.html">QSize</a> QAbstractItemView::sizeHintForIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const</h3>
<p>Returns the size hint for the item with the specified <i>index</i> or an invalid size for invalid indexes.</p>
<p>See also <a href="qabstractitemview.html#sizeHintForRow">sizeHintForRow</a>() and <a href="qabstractitemview.html#sizeHintForColumn">sizeHintForColumn</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/sizeHintForRow"></a>
<h3 class="fn"><a name="sizeHintForRow"></a>int QAbstractItemView::sizeHintForRow ( int <i>row</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the height size hint for the specified <i>row</i> or -1 if there is no model.</p>
<p>The returned height is calculated using the size hints of the given <i>row</i>'s items, i.e&#x2e; the returned value is the maximum height among the items. Note that to control the height of a row, you must reimplement the <a href="qabstractitemdelegate.html#sizeHint">QAbstractItemDelegate::sizeHint</a>() function.</p>
<p>This function is used in views with a vertical header to find the size hint for a header section based on the contents of the given <i>row</i>.</p>
<p>See also <a href="qabstractitemview.html#sizeHintForColumn">sizeHintForColumn</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/startDrag"></a>
<h3 class="fn"><a name="startDrag"></a>void QAbstractItemView::startDrag ( <a href="qt.html#DropAction-enum">Qt::DropActions</a> <i>supportedActions</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Starts a drag by calling drag-&gt;exec() using the given <i>supportedActions</i>.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/state"></a>
<h3 class="fn"><a name="state"></a><a href="qabstractitemview.html#State-enum">State</a> QAbstractItemView::state () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Returns the item view's state.</p>
<p>See also <a href="qabstractitemview.html#setState">setState</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/timerEvent"></a>
<h3 class="fn"><a name="timerEvent"></a>void QAbstractItemView::timerEvent ( <a href="qtimerevent.html">QTimerEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<p>This function is called with the given <i>event</i> when a timer event is sent to the widget.</p>
<p>See also <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/update"></a>
<h3 class="fn"><a name="update"></a>void QAbstractItemView::update ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Updates the area occupied by the given <i>index</i>.</p>
<p>This function was introduced in Qt 4.3.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/updateGeometries"></a>
<h3 class="fn"><a name="updateGeometries"></a>void QAbstractItemView::updateGeometries ()&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
<p>Updates the geometry of the child widgets of the view.</p>
<p>This function was introduced in Qt 4.4.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/verticalOffset"></a>
<h3 class="fn"><a name="verticalOffset"></a>int QAbstractItemView::verticalOffset () const&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
<p>Returns the vertical offset of the view.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractitemview.html#horizontalOffset">horizontalOffset</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/viewOptions"></a>
<h3 class="fn"><a name="viewOptions"></a><a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a> QAbstractItemView::viewOptions () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Returns a <a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a> structure populated with the view's palette, font, state, alignments etc.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/viewportEntered"></a>
<h3 class="fn"><a name="viewportEntered"></a>void QAbstractItemView::viewportEntered ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the mouse cursor enters the viewport. Mouse tracking needs to be enabled for this feature to work.</p>
<p>See also <a href="qabstractitemview.html#entered">entered</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/viewportEvent"></a>
<h3 class="fn"><a name="viewportEvent"></a>bool QAbstractItemView::viewportEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractscrollarea.html#viewportEvent">QAbstractScrollArea::viewportEvent</a>().</p>
<p>This function is used to handle tool tips, and What's This? mode, if the given <i>event</i> is a <a href="qevent.html#Type-enum">QEvent::ToolTip</a>,or a <a href="qevent.html#Type-enum">QEvent::WhatsThis</a>. It passes all other events on to its base class viewportEvent() handler.</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/visualRect"></a>
<h3 class="fn"><a name="visualRect"></a><a href="qrect.html">QRect</a> QAbstractItemView::visualRect ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Returns the rectangle on the viewport occupied by the item at <i>index</i>.</p>
<p>If your item is displayed in several areas then visualRect should return the primary area that contains index and not the complete area that index might encompasses, touch or cause drawing.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractitemview.html#indexAt">indexAt</a>() and <a href="qabstractitemview.html#visualRegionForSelection">visualRegionForSelection</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractItemView/visualRegionForSelection"></a>
<h3 class="fn"><a name="visualRegionForSelection"></a><a href="qregion.html">QRegion</a> QAbstractItemView::visualRegionForSelection ( const <a href="qitemselection.html">QItemSelection</a> &amp; <i>selection</i> ) const&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
<p>Returns the region from the viewport of the items in the given <i>selection</i>.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractitemview.html#visualRect">visualRect</a>() and <a href="qabstractitemview.html#selectedIndexes">selectedIndexes</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>