Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 3213

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qabstractitemview.cpp -->
  <title>QAbstractItemView Class | Qt Widgets 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QAbstractItemView</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-types">Protected Types</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#protected-slots">Protected Slots</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QAbstractItemView Class</h1>
<!-- $$$QAbstractItemView-brief -->
<p>The <a href="qabstractitemview.html">QAbstractItemView</a> class provides the basic functionality for item view classes. <a href="#details">More...</a></p>
<!-- @@@QAbstractItemView -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QAbstractItemView&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qabstractscrollarea.html">QAbstractScrollArea</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><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>
</td></tr></table></div><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>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#DragDropMode-enum">DragDropMode</a></b> { NoDragDrop, DragOnly, DropOnly, DragDrop, InternalMove }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a></b> { NoEditTriggers, CurrentChanged, DoubleClicked, SelectedClicked, ..., AllEditTriggers }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#EditTrigger-enum">EditTriggers</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#ScrollHint-enum">ScrollHint</a></b> { EnsureVisible, PositionAtTop, PositionAtBottom, PositionAtCenter }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#ScrollMode-enum">ScrollMode</a></b> { ScrollPerItem, ScrollPerPixel }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a></b> { SelectItems, SelectRows, SelectColumns }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a></b> { SingleSelection, ContiguousSelection, ExtendedSelection, MultiSelection, NoSelection }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qabstractitemview.html#alternatingRowColors-prop">alternatingRowColors</a></b> : bool</li>
<li class="fn"><b><a href="qabstractitemview.html#autoScroll-prop">autoScroll</a></b> : bool</li>
<li class="fn"><b><a href="qabstractitemview.html#autoScrollMargin-prop">autoScrollMargin</a></b> : int</li>
<li class="fn"><b><a href="qabstractitemview.html#defaultDropAction-prop">defaultDropAction</a></b> : Qt::DropAction</li>
<li class="fn"><b><a href="qabstractitemview.html#dragDropMode-prop">dragDropMode</a></b> : DragDropMode</li>
<li class="fn"><b><a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a></b> : bool</li>
<li class="fn"><b><a href="qabstractitemview.html#dragEnabled-prop">dragEnabled</a></b> : bool</li>
<li class="fn"><b><a href="qabstractitemview.html#editTriggers-prop">editTriggers</a></b> : EditTriggers</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qabstractitemview.html#horizontalScrollMode-prop">horizontalScrollMode</a></b> : ScrollMode</li>
<li class="fn"><b><a href="qabstractitemview.html#iconSize-prop">iconSize</a></b> : QSize</li>
<li class="fn"><b><a href="qabstractitemview.html#selectionBehavior-prop">selectionBehavior</a></b> : SelectionBehavior</li>
<li class="fn"><b><a href="qabstractitemview.html#selectionMode-prop">selectionMode</a></b> : SelectionMode</li>
<li class="fn"><b><a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a></b> : bool</li>
<li class="fn"><b><a href="qabstractitemview.html#tabKeyNavigation-prop">tabKeyNavigation</a></b> : bool</li>
<li class="fn"><b><a href="qabstractitemview.html#textElideMode-prop">textElideMode</a></b> : Qt::TextElideMode</li>
<li class="fn"><b><a href="qabstractitemview.html#verticalScrollMode-prop">verticalScrollMode</a></b> : ScrollMode</li>
</ul>
</td></tr>
</table></div>
<ul>
<li class="fn">3 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">59 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#QAbstractItemView">QAbstractItemView</a></b>(QWidget *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dtor.QAbstractItemView">~QAbstractItemView</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#alternatingRowColors-prop">alternatingRowColors</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#autoScrollMargin-prop">autoScrollMargin</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#closePersistentEditor">closePersistentEditor</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#currentIndex">currentIndex</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::DropAction </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#defaultDropAction-prop">defaultDropAction</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> DragDropMode </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dragDropMode-prop">dragDropMode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dragEnabled-prop">dragEnabled</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> EditTriggers </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#editTriggers-prop">editTriggers</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#autoScroll-prop">hasAutoScroll</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ScrollMode </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#horizontalScrollMode-prop">horizontalScrollMode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#iconSize-prop">iconSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#indexAt">indexAt</a></b>(const QPoint &amp;<i>point</i>) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#indexWidget">indexWidget</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractItemDelegate *</td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#itemDelegate">itemDelegate</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractItemDelegate *</td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#itemDelegate-1">itemDelegate</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractItemDelegate *</td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#itemDelegateForColumn">itemDelegateForColumn</a></b>(int <i>column</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractItemDelegate *</td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#itemDelegateForRow">itemDelegateForRow</a></b>(int <i>row</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#keyboardSearch">keyboardSearch</a></b>(const QString &amp;<i>search</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractItemModel *</td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#model">model</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#openPersistentEditor">openPersistentEditor</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#horizontalScrollMode-prop">resetHorizontalScrollMode</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#verticalScrollMode-prop">resetVerticalScrollMode</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#rootIndex">rootIndex</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> QAbstractItemView::SelectionBehavior </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#selectionBehavior-prop">selectionBehavior</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractItemView::SelectionMode </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#selectionMode-prop">selectionMode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QItemSelectionModel *</td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#selectionModel">selectionModel</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#alternatingRowColors-prop">setAlternatingRowColors</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#autoScroll-prop">setAutoScroll</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#autoScrollMargin-prop">setAutoScrollMargin</a></b>(int <i>margin</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#defaultDropAction-prop">setDefaultDropAction</a></b>(Qt::DropAction <i>dropAction</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dragDropMode-prop">setDragDropMode</a></b>(DragDropMode <i>behavior</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dragDropOverwriteMode-prop">setDragDropOverwriteMode</a></b>(bool <i>overwrite</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dragEnabled-prop">setDragEnabled</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#showDropIndicator-prop">setDropIndicatorShown</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#editTriggers-prop">setEditTriggers</a></b>(EditTriggers <i>triggers</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#horizontalScrollMode-prop">setHorizontalScrollMode</a></b>(ScrollMode <i>mode</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#iconSize-prop">setIconSize</a></b>(const QSize &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a></b>(QAbstractItemDelegate *<i>delegate</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#setItemDelegateForColumn">setItemDelegateForColumn</a></b>(int <i>column</i>, QAbstractItemDelegate *<i>delegate</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#setItemDelegateForRow">setItemDelegateForRow</a></b>(int <i>row</i>, QAbstractItemDelegate *<i>delegate</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#setModel">setModel</a></b>(QAbstractItemModel *<i>model</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#selectionBehavior-prop">setSelectionBehavior</a></b>(QAbstractItemView::SelectionBehavior <i>behavior</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#selectionMode-prop">setSelectionMode</a></b>(QAbstractItemView::SelectionMode <i>mode</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a></b>(QItemSelectionModel *<i>selectionModel</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#tabKeyNavigation-prop">setTabKeyNavigation</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#textElideMode-prop">setTextElideMode</a></b>(Qt::TextElideMode <i>mode</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#verticalScrollMode-prop">setVerticalScrollMode</a></b>(ScrollMode <i>mode</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#sizeHintForColumn">sizeHintForColumn</a></b>(int <i>column</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#sizeHintForIndex">sizeHintForIndex</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#sizeHintForRow">sizeHintForRow</a></b>(int <i>row</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#tabKeyNavigation-prop">tabKeyNavigation</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::TextElideMode </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#textElideMode-prop">textElideMode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ScrollMode </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#verticalScrollMode-prop">verticalScrollMode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRect </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#visualRect">visualRect</a></b>(const QModelIndex &amp;<i>index</i>) const = 0</td></tr>
</table></div>
<a name="reimplemented-public-functions"></a>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#inputMethodQuery">inputMethodQuery</a></b>(Qt::InputMethodQuery <i>query</i>) const</td></tr>
</table></div>
<ul>
<li class="fn">20 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">214 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">32 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
<li class="fn">14 public functions inherited from <a href="../qtgui/qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#clearSelection">clearSelection</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#edit">edit</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#reset">reset</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#scrollToBottom">scrollToBottom</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#scrollToTop">scrollToTop</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#selectAll">selectAll</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#setRootIndex">setRootIndex</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#update">update</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
</table></div>
<ul>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#activated">activated</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#clicked">clicked</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#doubleClicked">doubleClicked</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#entered">entered</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#iconSize-prop">iconSizeChanged</a></b>(const QSize &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#pressed">pressed</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#viewportEntered">viewportEntered</a></b>()</td></tr>
</table></div>
<ul>
<li class="fn">3 signals inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-types"></a>
<h2 id="protected-types">Protected Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#CursorAction-enum">CursorAction</a></b> { MoveUp, MoveDown, MoveLeft, MoveRight, ..., MovePrevious }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#DropIndicatorPosition-enum">DropIndicatorPosition</a></b> { OnItem, AboveItem, BelowItem, OnViewport }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#State-enum">State</a></b> { NoState, DraggingState, DragSelectingState, EditingState, ..., AnimatingState }</td></tr>
</table></div>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> DropIndicatorPosition </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dropIndicatorPosition">dropIndicatorPosition</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#edit-1">edit</a></b>(const QModelIndex &amp;<i>index</i>, EditTrigger <i>trigger</i>, QEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#executeDelayedItemsLayout">executeDelayedItemsLayout</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#horizontalOffset">horizontalOffset</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#isIndexHidden">isIndexHidden</a></b>(const QModelIndex &amp;<i>index</i>) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QModelIndex </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#scheduleDelayedItemsLayout">scheduleDelayedItemsLayout</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a></b>(int <i>dx</i>, int <i>dy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QModelIndexList </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QItemSelectionModel::SelectionFlags </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#selectionCommand">selectionCommand</a></b>(const QModelIndex &amp;<i>index</i>, const QEvent *<i>event</i> = Q_NULLPTR) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#setDirtyRegion">setDirtyRegion</a></b>(const QRegion &amp;<i>region</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#setState">setState</a></b>(State <i>state</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#startDrag">startDrag</a></b>(Qt::DropActions <i>supportedActions</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> State </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#state">state</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#verticalOffset">verticalOffset</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QStyleOptionViewItem </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#viewOptions">viewOptions</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRegion </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#visualRegionForSelection">visualRegionForSelection</a></b>(const QItemSelection &amp;<i>selection</i>) const = 0</td></tr>
</table></div>
<a name="reimplemented-protected-functions"></a>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dragEnterEvent">dragEnterEvent</a></b>(QDragEnterEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dragLeaveEvent">dragLeaveEvent</a></b>(QDragLeaveEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dragMoveEvent">dragMoveEvent</a></b>(QDragMoveEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dropEvent">dropEvent</a></b>(QDropEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#event">event</a></b>(QEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#focusInEvent">focusInEvent</a></b>(QFocusEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#focusNextPrevChild">focusNextPrevChild</a></b>(bool <i>next</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#focusOutEvent">focusOutEvent</a></b>(QFocusEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#inputMethodEvent">inputMethodEvent</a></b>(QInputMethodEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#keyPressEvent">keyPressEvent</a></b>(QKeyEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b>(QMouseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#mouseMoveEvent">mouseMoveEvent</a></b>(QMouseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#mousePressEvent">mousePressEvent</a></b>(QMouseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#mouseReleaseEvent">mouseReleaseEvent</a></b>(QMouseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#resizeEvent">resizeEvent</a></b>(QResizeEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#timerEvent">timerEvent</a></b>(QTimerEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#viewportEvent">viewportEvent</a></b>(QEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#viewportSizeHint">viewportSizeHint</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn">20 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
<li class="fn">4 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">35 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="../qtgui/qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<a name="protected-slots"></a>
<h2 id="protected-slots">Protected Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#closeEditor">closeEditor</a></b>(QWidget *<i>editor</i>, QAbstractItemDelegate::EndEditHint <i>hint</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#commitData">commitData</a></b>(QWidget *<i>editor</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#dataChanged">dataChanged</a></b>(const QModelIndex &amp;<i>topLeft</i>, const QModelIndex &amp;<i>bottomRight</i>, const QVector&lt;int&gt; &amp;<i>roles</i> = QVector&lt;int&gt; ())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#editorDestroyed">editorDestroyed</a></b>(QObject *<i>editor</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractitemview.html#updateGeometries">updateGeometries</a></b>()</td></tr>
</table></div>
<ul>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">5 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
<li class="fn">1 protected type inherited from <a href="../qtgui/qpaintdevice.html#protected-variables">QPaintDevice</a></li>
</ul>
<a name="details"></a>
<!-- $$$QAbstractItemView-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qabstractitemview.html">QAbstractItemView</a> class provides the basic functionality for item view classes.</p>
<p><a href="qabstractitemview.html">QAbstractItemView</a> class is the base class for every standard view that uses a <a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a>. <a href="qabstractitemview.html">QAbstractItemView</a> 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>
<div class="table"><table class="generic">
 <thead><tr 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></div>
<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 <a href="qabstractitemview.html">QAbstractItemView</a> class is one of the <a href="model-view-programming.html#model-view-classes">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 <a href="qabstractitemview.html">QAbstractItemView</a> only need to implement their own view-specific functionality, such as drawing items, returning the geometry of items, finding items, etc.</p>
<p><a href="qabstractitemview.html">QAbstractItemView</a> 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 <a href="qabstractitemview.html">QAbstractItemView</a>'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 class="cpp">

  <span class="type">void</span> MyView<span class="operator">::</span>resizeEvent(<span class="type"><a href="../qtgui/qresizeevent.html">QResizeEvent</a></span> <span class="operator">*</span>event) {
      horizontalScrollBar()<span class="operator">-</span><span class="operator">&gt;</span>setRange(<span class="number">0</span><span class="operator">,</span> realWidth <span class="operator">-</span> width());
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  }

</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="../qtcore/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><a href="qabstractitemview.html">QAbstractItemView</a> 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 <a href="qabstractitemview.html">QAbstractItemView</a> 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></div>
<p><b>See also </b><a href="model-view-programming.html#view-classes">View Classes</a>, <a href="model-view-programming.html">Model/View Programming</a>, <a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a>, and <a href="qtwidgets-itemviews-chart-example.html">Chart Example</a>.</p>
<!-- @@@QAbstractItemView -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$CursorAction$$$MoveUp$$$MoveDown$$$MoveLeft$$$MoveRight$$$MoveHome$$$MoveEnd$$$MovePageUp$$$MovePageDown$$$MoveNext$$$MovePrevious -->
<h3 class="fn" id="CursorAction-enum"><a name="CursorAction-enum"></a>enum QAbstractItemView::<span class="name">CursorAction</span></h3>
<p>This enum describes the different ways to navigate between items,</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MoveUp</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Move to the item above the current item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MoveDown</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Move to the item below the current item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MoveLeft</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Move to the item left of the current item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MoveRight</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Move to the item right of the current item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MoveHome</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Move to the top-left corner item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MoveEnd</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Move to the bottom-right corner item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MovePageUp</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">Move one page up above the current item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MovePageDown</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">Move one page down below the current item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MoveNext</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">Move to the item after the current item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::MovePrevious</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">Move to the item before the current item.</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractitemview.html#moveCursor">moveCursor</a>().</p>
<!-- @@@CursorAction -->
<!-- $$$DragDropMode$$$NoDragDrop$$$DragOnly$$$DropOnly$$$DragDrop$$$InternalMove -->
<h3 class="fn" id="DragDropMode-enum"><a name="DragDropMode-enum"></a>enum QAbstractItemView::<span class="name">DragDropMode</span></h3>
<p>Describes the various drag and drop events the view can act upon. By default the view does not support dragging or dropping (<code>NoDragDrop</code>).</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QAbstractItemView::NoDragDrop</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Does not support dragging or dropping.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::DragOnly</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The view supports dragging of its own items</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::DropOnly</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The view accepts drops</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::DragDrop</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The view supports both dragging and dropping</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::InternalMove</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The view accepts move (<b>not copy</b>) operations only from itself.</td></tr>
</table></div>
<p>Note that the model used needs to provide support for drag and drop operations.</p>
<p>This enum was introduced or modified in  Qt 4.2.</p>
<p><b>See also </b><a href="qabstractitemview.html#dragDropMode-prop">setDragDropMode</a>() and <a href="model-view-programming.html#using-drag-and-drop-with-item-views">Using drag and drop with item views</a>.</p>
<!-- @@@DragDropMode -->
<!-- $$$DropIndicatorPosition$$$OnItem$$$AboveItem$$$BelowItem$$$OnViewport -->
<h3 class="fn" id="DropIndicatorPosition-enum"><a name="DropIndicatorPosition-enum"></a>enum QAbstractItemView::<span class="name">DropIndicatorPosition</span></h3>
<p>This enum indicates the position of the drop indicator in relation to the index at the current mouse position:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QAbstractItemView::OnItem</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The item will be dropped on the index.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::AboveItem</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The item will be dropped above the index.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::BelowItem</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The item will be dropped below the index.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::OnViewport</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">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></div>
<!-- @@@DropIndicatorPosition -->
<!-- $$$EditTrigger$$$NoEditTriggers$$$CurrentChanged$$$DoubleClicked$$$SelectedClicked$$$EditKeyPressed$$$AnyKeyPressed$$$AllEditTriggers -->
<h3 class="flags" id="EditTrigger-enum"><a name="EditTrigger-enum"></a>enum QAbstractItemView::<span class="name">EditTrigger</span><br/>flags QAbstractItemView::<span class="name">EditTriggers</span></h3>
<p>This enum describes actions which will initiate item editing.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QAbstractItemView::NoEditTriggers</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">No editing possible.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::CurrentChanged</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Editing start whenever current item changes.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::DoubleClicked</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Editing starts when an item is double clicked.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::SelectedClicked</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Editing starts when clicking on an already selected item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::EditKeyPressed</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">Editing starts when the platform edit key has been pressed over an item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::AnyKeyPressed</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">Editing starts when any key is pressed over an item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::AllEditTriggers</code></td><td class="topAlign tblval"><code>31</code></td><td class="topAlign">Editing starts for all above actions.</td></tr>
</table></div>
<p>The EditTriggers type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;EditTrigger&gt;. It stores an OR combination of EditTrigger values.</p>
<!-- @@@EditTrigger -->
<!-- $$$ScrollHint$$$EnsureVisible$$$PositionAtTop$$$PositionAtBottom$$$PositionAtCenter -->
<h3 class="fn" id="ScrollHint-enum"><a name="ScrollHint-enum"></a>enum QAbstractItemView::<span class="name">ScrollHint</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QAbstractItemView::EnsureVisible</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Scroll to ensure that the item is visible.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::PositionAtTop</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Scroll to position the item at the top of the viewport.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::PositionAtBottom</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Scroll to position the item at the bottom of the viewport.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::PositionAtCenter</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Scroll to position the item at the center of the viewport.</td></tr>
</table></div>
<!-- @@@ScrollHint -->
<!-- $$$ScrollMode$$$ScrollPerItem$$$ScrollPerPixel -->
<h3 class="fn" id="ScrollMode-enum"><a name="ScrollMode-enum"></a>enum QAbstractItemView::<span class="name">ScrollMode</span></h3>
<p>Describes how the scrollbar should behave. When setting the scroll mode to ScrollPerPixel the single step size will adjust automatically unless it was set explicitly using <a href="qabstractslider.html#singleStep-prop">setSingleStep()</a>. The automatic adjustment can be restored by setting the single step size to -1.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QAbstractItemView::ScrollPerItem</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The view will scroll the contents one item at a time.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::ScrollPerPixel</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The view will scroll the contents one pixel at a time.</td></tr>
</table></div>
<p>This enum was introduced or modified in  Qt 4.2.</p>
<!-- @@@ScrollMode -->
<!-- $$$SelectionBehavior$$$SelectItems$$$SelectRows$$$SelectColumns -->
<h3 class="fn" id="SelectionBehavior-enum"><a name="SelectionBehavior-enum"></a>enum QAbstractItemView::<span class="name">SelectionBehavior</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QAbstractItemView::SelectItems</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Selecting single items.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::SelectRows</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Selecting only rows.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::SelectColumns</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Selecting only columns.</td></tr>
</table></div>
<!-- @@@SelectionBehavior -->
<!-- $$$SelectionMode$$$NoSelection$$$SingleSelection$$$MultiSelection$$$ExtendedSelection$$$ContiguousSelection -->
<h3 class="fn" id="SelectionMode-enum"><a name="SelectionMode-enum"></a>enum QAbstractItemView::<span class="name">SelectionMode</span></h3>
<p>This enum indicates how the view responds to user selections:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QAbstractItemView::SingleSelection</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">When the user selects an item, any already-selected item becomes unselected. It is possible for the user to deselect the selected item.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::ContiguousSelection</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">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 class="topAlign"><code>QAbstractItemView::ExtendedSelection</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">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 class="topAlign"><code>QAbstractItemView::MultiSelection</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">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 class="topAlign"><code>QAbstractItemView::NoSelection</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Items cannot be selected.</td></tr>
</table></div>
<p>The most commonly used modes are SingleSelection and ExtendedSelection.</p>
<!-- @@@SelectionMode -->
<!-- $$$State$$$NoState$$$DraggingState$$$DragSelectingState$$$EditingState$$$ExpandingState$$$CollapsingState$$$AnimatingState -->
<h3 class="fn" id="State-enum"><a name="State-enum"></a>enum QAbstractItemView::<span class="name">State</span></h3>
<p>Describes the different states the view can be in. This is usually only interesting when reimplementing your own view.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QAbstractItemView::NoState</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The is the default state.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::DraggingState</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The user is dragging items.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::DragSelectingState</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The user is selecting items.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::EditingState</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The user is editing an item in a widget editor.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::ExpandingState</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The user is opening a branch of items.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::CollapsingState</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">The user is closing a branch of items.</td></tr>
<tr><td class="topAlign"><code>QAbstractItemView::AnimatingState</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">The item view is performing an animation.</td></tr>
</table></div>
<!-- @@@State -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$alternatingRowColors-prop$$$alternatingRowColors$$$setAlternatingRowColorsbool -->
<h3 class="fn" id="alternatingRowColors-prop"><a name="alternatingRowColors-prop"></a><span class="name">alternatingRowColors</span> : <span class="type">bool</span></h3>
<p>This property holds whether to draw the background using alternating colors</p>
<p>If this property is <code>true</code>, the item background will be drawn using <a href="../qtgui/qpalette.html#ColorRole-enum">QPalette::Base</a> and <a href="../qtgui/qpalette.html#ColorRole-enum">QPalette::AlternateBase</a>; otherwise the background will be drawn using the <a href="../qtgui/qpalette.html#ColorRole-enum">QPalette::Base</a> color.</p>
<p>By default, this property is <code>false</code>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>alternatingRowColors</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAlternatingRowColors</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<!-- @@@alternatingRowColors -->
<!-- $$$autoScroll-prop$$$hasAutoScroll$$$setAutoScrollbool -->
<h3 class="fn" id="autoScroll-prop"><a name="autoScroll-prop"></a><span class="name">autoScroll</span> : <span class="type">bool</span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>hasAutoScroll</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoScroll</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<!-- @@@autoScroll -->
<!-- $$$autoScrollMargin-prop$$$autoScrollMargin$$$setAutoScrollMarginint -->
<h3 class="fn" id="autoScrollMargin-prop"><a name="autoScrollMargin-prop"></a><span class="name">autoScrollMargin</span> : <span class="type">int</span></h3>
<p>This property holds the size of the area when auto scrolling is triggered</p>
<p>This property controls 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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>autoScrollMargin</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoScrollMargin</b></span>(int <i>margin</i>)</td></tr>
</table></div>
<!-- @@@autoScrollMargin -->
<!-- $$$defaultDropAction-prop$$$defaultDropAction$$$setDefaultDropActionQt::DropAction -->
<h3 class="fn" id="defaultDropAction-prop"><a name="defaultDropAction-prop"></a><span class="name">defaultDropAction</span> : <span class="type"><a href="../qtcore/qt.html#DropAction-enum">Qt::DropAction</a></span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::DropAction </td><td class="memItemRight bottomAlign"><span class="name"><b>defaultDropAction</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDefaultDropAction</b></span>(Qt::DropAction <i>dropAction</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a> and <a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a>.</p>
<!-- @@@defaultDropAction -->
<!-- $$$dragDropMode-prop$$$dragDropMode$$$setDragDropModeDragDropMode -->
<h3 class="fn" id="dragDropMode-prop"><a name="dragDropMode-prop"></a><span class="name">dragDropMode</span> : <span class="type"><a href="qabstractitemview.html#DragDropMode-enum">DragDropMode</a></span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> DragDropMode </td><td class="memItemRight bottomAlign"><span class="name"><b>dragDropMode</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDragDropMode</b></span>(DragDropMode <i>behavior</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a> and <a href="qabstractitemview.html#dragDropOverwriteMode-prop">dragDropOverwriteMode</a>.</p>
<!-- @@@dragDropMode -->
<!-- $$$dragDropOverwriteMode-prop$$$dragDropOverwriteMode$$$setDragDropOverwriteModebool -->
<h3 class="fn" id="dragDropOverwriteMode-prop"><a name="dragDropOverwriteMode-prop"></a><span class="name">dragDropOverwriteMode</span> : <span class="type">bool</span></h3>
<p>This property holds the view's drag and drop behavior</p>
<p>If its value is <code>true</code>, the selected data will overwrite the existing item data when dropped, while moving the data will clear the item. If its value is <code>false</code>, 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 <code>false</code>, 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 <code>true</code>.</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="../qtcore/qt.html#ItemFlag-enum">Qt::ItemIsDropEnabled</a>.</p>
<p>This property was introduced in  Qt 4.2.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>dragDropOverwriteMode</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDragDropOverwriteMode</b></span>(bool <i>overwrite</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractitemview.html#dragDropMode-prop">dragDropMode</a>.</p>
<!-- @@@dragDropOverwriteMode -->
<!-- $$$dragEnabled-prop$$$dragEnabled$$$setDragEnabledbool -->
<h3 class="fn" id="dragEnabled-prop"><a name="dragEnabled-prop"></a><span class="name">dragEnabled</span> : <span class="type">bool</span></h3>
<p>This property holds whether the view supports dragging of its own items</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>dragEnabled</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDragEnabled</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<p><b>See also </b><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>
<!-- @@@dragEnabled -->
<!-- $$$editTriggers-prop$$$editTriggers$$$setEditTriggersEditTriggers -->
<h3 class="fn" id="editTriggers-prop"><a name="editTriggers-prop"></a><span class="name">editTriggers</span> : <span class="type"><a href="qabstractitemview.html#EditTrigger-enum">EditTriggers</a></span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> EditTriggers </td><td class="memItemRight bottomAlign"><span class="name"><b>editTriggers</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setEditTriggers</b></span>(EditTriggers <i>triggers</i>)</td></tr>
</table></div>
<!-- @@@editTriggers -->
<!-- $$$horizontalScrollMode-prop$$$horizontalScrollMode$$$setHorizontalScrollModeScrollMode$$$resetHorizontalScrollMode -->
<h3 class="fn" id="horizontalScrollMode-prop"><a name="horizontalScrollMode-prop"></a><span class="name">horizontalScrollMode</span> : <span class="type"><a href="qabstractitemview.html#ScrollMode-enum">ScrollMode</a></span></h3>
<p>how the view scrolls its contents in the horizontal direction</p>
<p>This property controls how the view scroll its contents horizontally. Scrolling can be done either per pixel or per item. Its default value comes from the style via the <a href="qstyle.html#StyleHint-enum">QStyle::SH_ItemView_ScrollMode</a> style hint.</p>
<p>This property was introduced in  Qt 4.2.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> ScrollMode </td><td class="memItemRight bottomAlign"><span class="name"><b>horizontalScrollMode</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setHorizontalScrollMode</b></span>(ScrollMode <i>mode</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>resetHorizontalScrollMode</b></span>()</td></tr>
</table></div>
<!-- @@@horizontalScrollMode -->
<!-- $$$iconSize-prop$$$iconSize$$$setIconSizeconstQSize&$$$iconSizeChangedconstQSize& -->
<h3 class="fn" id="iconSize-prop"><a name="iconSize-prop"></a><span class="name">iconSize</span> : <span class="type"><a href="../qtcore/qsize.html">QSize</a></span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QSize </td><td class="memItemRight bottomAlign"><span class="name"><b>iconSize</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setIconSize</b></span>(const QSize &amp;<i>size</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>iconSizeChanged</b></span>(const QSize &amp;<i>size</i>)</td></tr>
</table></div>
<!-- @@@iconSize -->
<!-- $$$selectionBehavior-prop$$$selectionBehavior$$$setSelectionBehaviorQAbstractItemView::SelectionBehavior -->
<h3 class="fn" id="selectionBehavior-prop"><a name="selectionBehavior-prop"></a><span class="name">selectionBehavior</span> : <span class="type"><a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a></span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QAbstractItemView::SelectionBehavior </td><td class="memItemRight bottomAlign"><span class="name"><b>selectionBehavior</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSelectionBehavior</b></span>(QAbstractItemView::SelectionBehavior <i>behavior</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a> and <a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a>.</p>
<!-- @@@selectionBehavior -->
<!-- $$$selectionMode-prop$$$selectionMode$$$setSelectionModeQAbstractItemView::SelectionMode -->
<h3 class="fn" id="selectionMode-prop"><a name="selectionMode-prop"></a><span class="name">selectionMode</span> : <span class="type"><a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a></span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QAbstractItemView::SelectionMode </td><td class="memItemRight bottomAlign"><span class="name"><b>selectionMode</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSelectionMode</b></span>(QAbstractItemView::SelectionMode <i>mode</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a> and <a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a>.</p>
<!-- @@@selectionMode -->
<!-- $$$showDropIndicator-prop$$$showDropIndicator$$$setDropIndicatorShownbool -->
<h3 class="fn" id="showDropIndicator-prop"><a name="showDropIndicator-prop"></a><span class="name">showDropIndicator</span> : <span class="type">bool</span></h3>
<p>This property holds whether the drop indicator is shown when dragging items and dropping.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>showDropIndicator</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDropIndicatorShown</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<p><b>See also </b><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>
<!-- @@@showDropIndicator -->
<!-- $$$tabKeyNavigation-prop$$$tabKeyNavigation$$$setTabKeyNavigationbool -->
<h3 class="fn" id="tabKeyNavigation-prop"><a name="tabKeyNavigation-prop"></a><span class="name">tabKeyNavigation</span> : <span class="type">bool</span></h3>
<p>This property holds whether item navigation with tab and backtab is enabled.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>tabKeyNavigation</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTabKeyNavigation</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<!-- @@@tabKeyNavigation -->
<!-- $$$textElideMode-prop$$$textElideMode$$$setTextElideModeQt::TextElideMode -->
<h3 class="fn" id="textElideMode-prop"><a name="textElideMode-prop"></a><span class="name">textElideMode</span> : <span class="type"><a href="../qtcore/qt.html#TextElideMode-enum">Qt::TextElideMode</a></span></h3>
<p>This property holds the position of the &quot;..&#x2e;&quot; in elided text.</p>
<p>The default value for all item views is <a href="../qtcore/qt.html#TextElideMode-enum">Qt::ElideRight</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::TextElideMode </td><td class="memItemRight bottomAlign"><span class="name"><b>textElideMode</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTextElideMode</b></span>(Qt::TextElideMode <i>mode</i>)</td></tr>
</table></div>
<!-- @@@textElideMode -->
<!-- $$$verticalScrollMode-prop$$$verticalScrollMode$$$setVerticalScrollModeScrollMode$$$resetVerticalScrollMode -->
<h3 class="fn" id="verticalScrollMode-prop"><a name="verticalScrollMode-prop"></a><span class="name">verticalScrollMode</span> : <span class="type"><a href="qabstractitemview.html#ScrollMode-enum">ScrollMode</a></span></h3>
<p>how the view scrolls its contents in the vertical direction</p>
<p>This property controls how the view scroll its contents vertically. Scrolling can be done either per pixel or per item. Its default value comes from the style via the <a href="qstyle.html#StyleHint-enum">QStyle::SH_ItemView_ScrollMode</a> style hint.</p>
<p>This property was introduced in  Qt 4.2.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> ScrollMode </td><td class="memItemRight bottomAlign"><span class="name"><b>verticalScrollMode</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVerticalScrollMode</b></span>(ScrollMode <i>mode</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>resetVerticalScrollMode</b></span>()</td></tr>
</table></div>
<!-- @@@verticalScrollMode -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QAbstractItemView[overload1]$$$QAbstractItemViewQWidget* -->
<h3 class="fn" id="QAbstractItemView"><a name="QAbstractItemView"></a>QAbstractItemView::<span class="name">QAbstractItemView</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs an abstract item view with the given <i>parent</i>.</p>
<!-- @@@QAbstractItemView -->
<!-- $$$~QAbstractItemView[overload1]$$$~QAbstractItemView -->
<h3 class="fn" id="dtor.QAbstractItemView"><a name="dtor.QAbstractItemView"></a>QAbstractItemView::<span class="name">~QAbstractItemView</span>()</h3>
<p>Destroys the view.</p>
<!-- @@@~QAbstractItemView -->
<!-- $$$activated[overload1]$$$activatedconstQModelIndex& -->
<h3 class="fn" id="activated"><a name="activated"></a><code>[signal] </code><span class="type">void</span> QAbstractItemView::<span class="name">activated</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</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><b>See also </b><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>
<!-- @@@activated -->
<!-- $$$clearSelection[overload1]$$$clearSelection -->
<h3 class="fn" id="clearSelection"><a name="clearSelection"></a><code>[slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">clearSelection</span>()</h3>
<p>Deselects all selected items. The current index will not be changed.</p>
<p><b>See also </b><a href="qabstractitemview.html#setSelection">setSelection</a>() and <a href="qabstractitemview.html#selectAll">selectAll</a>().</p>
<!-- @@@clearSelection -->
<!-- $$$clicked[overload1]$$$clickedconstQModelIndex& -->
<h3 class="fn" id="clicked"><a name="clicked"></a><code>[signal] </code><span class="type">void</span> QAbstractItemView::<span class="name">clicked</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</h3>
<p>This signal is emitted when a mouse button is left-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><b>See also </b><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>
<!-- @@@clicked -->
<!-- $$$closeEditor[overload1]$$$closeEditorQWidget*QAbstractItemDelegate::EndEditHint -->
<h3 class="fn" id="closeEditor"><a name="closeEditor"></a><code>[virtual protected slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">closeEditor</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>editor</i>, <span class="type"><a href="qabstractitemdelegate.html#EndEditHint-enum">QAbstractItemDelegate::EndEditHint</a></span> <i>hint</i>)</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><b>See also </b><a href="qabstractitemview.html#edit">edit</a>() and <a href="qabstractitemview.html#commitData">commitData</a>().</p>
<!-- @@@closeEditor -->
<!-- $$$closePersistentEditor[overload1]$$$closePersistentEditorconstQModelIndex& -->
<h3 class="fn" id="closePersistentEditor"><a name="closePersistentEditor"></a><span class="type">void</span> QAbstractItemView::<span class="name">closePersistentEditor</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</h3>
<p>Closes the persistent editor for the item at the given <i>index</i>.</p>
<p><b>See also </b><a href="qabstractitemview.html#openPersistentEditor">openPersistentEditor</a>().</p>
<!-- @@@closePersistentEditor -->
<!-- $$$commitData[overload1]$$$commitDataQWidget* -->
<h3 class="fn" id="commitData"><a name="commitData"></a><code>[virtual protected slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">commitData</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>editor</i>)</h3>
<p>Commit the data in the <i>editor</i> to the model.</p>
<p><b>See also </b><a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
<!-- @@@commitData -->
<!-- $$$currentChanged[overload1]$$$currentChangedconstQModelIndex&constQModelIndex& -->
<h3 class="fn" id="currentChanged"><a name="currentChanged"></a><code>[virtual protected slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">currentChanged</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>current</i>, const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>previous</i>)</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>
<!-- @@@currentChanged -->
<!-- $$$currentIndex[overload1]$$$currentIndex -->
<h3 class="fn" id="currentIndex"><a name="currentIndex"></a><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QAbstractItemView::<span class="name">currentIndex</span>() const</h3>
<p>Returns the model index of the current item.</p>
<p><b>See also </b><a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a>().</p>
<!-- @@@currentIndex -->
<!-- $$$dataChanged[overload1]$$$dataChangedconstQModelIndex&constQModelIndex&constQVector<int>& -->
<h3 class="fn" id="dataChanged"><a name="dataChanged"></a><code>[virtual protected slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">dataChanged</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>topLeft</i>, const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>bottomRight</i>, const <span class="type"><a href="../qtcore/qvector.html">QVector</a></span>&lt;<span class="type">int</span>&gt; &amp;<i>roles</i> = QVector&lt;int&gt; ())</h3>
<p>This slot is called when items with the given <i>roles</i> 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>
<p>The <i>roles</i> which have been changed can either be an empty container (meaning everything has changed), or a non-empty container with the subset of roles which have changed.</p>
<!-- @@@dataChanged -->
<!-- $$$dirtyRegionOffset[overload1]$$$dirtyRegionOffset -->
<h3 class="fn" id="dirtyRegionOffset"><a name="dirtyRegionOffset"></a><code>[protected] </code><span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> QAbstractItemView::<span class="name">dirtyRegionOffset</span>() const</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><b>See also </b><a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>() and <a href="qabstractitemview.html#setDirtyRegion">setDirtyRegion</a>().</p>
<!-- @@@dirtyRegionOffset -->
<!-- $$$doubleClicked[overload1]$$$doubleClickedconstQModelIndex& -->
<h3 class="fn" id="doubleClicked"><a name="doubleClicked"></a><code>[signal] </code><span class="type">void</span> QAbstractItemView::<span class="name">doubleClicked</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</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><b>See also </b><a href="qabstractitemview.html#clicked">clicked</a>() and <a href="qabstractitemview.html#activated">activated</a>().</p>
<!-- @@@doubleClicked -->
<!-- $$$dragEnterEvent[overload1]$$$dragEnterEventQDragEnterEvent* -->
<h3 class="fn" id="dragEnterEvent"><a name="dragEnterEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">dragEnterEvent</span>(<span class="type"><a href="../qtgui/qdragenterevent.html">QDragEnterEvent</a></span> *<i>event</i>)</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><b>See also </b><a href="qabstractitemview.html#dropEvent">dropEvent</a>() and <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
<!-- @@@dragEnterEvent -->
<!-- $$$dragLeaveEvent[overload1]$$$dragLeaveEventQDragLeaveEvent* -->
<h3 class="fn" id="dragLeaveEvent"><a name="dragLeaveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">dragLeaveEvent</span>(<span class="type"><a href="../qtgui/qdragleaveevent.html">QDragLeaveEvent</a></span> *<i>event</i>)</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>
<!-- @@@dragLeaveEvent -->
<!-- $$$dragMoveEvent[overload1]$$$dragMoveEventQDragMoveEvent* -->
<h3 class="fn" id="dragMoveEvent"><a name="dragMoveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">dragMoveEvent</span>(<span class="type"><a href="../qtgui/qdragmoveevent.html">QDragMoveEvent</a></span> *<i>event</i>)</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><b>See also </b><a href="qabstractitemview.html#dropEvent">dropEvent</a>() and <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
<!-- @@@dragMoveEvent -->
<!-- $$$dropEvent[overload1]$$$dropEventQDropEvent* -->
<h3 class="fn" id="dropEvent"><a name="dropEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">dropEvent</span>(<span class="type"><a href="../qtgui/qdropevent.html">QDropEvent</a></span> *<i>event</i>)</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><b>See also </b><a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
<!-- @@@dropEvent -->
<!-- $$$dropIndicatorPosition[overload1]$$$dropIndicatorPosition -->
<h3 class="fn" id="dropIndicatorPosition"><a name="dropIndicatorPosition"></a><code>[protected] </code><span class="type"><a href="qabstractitemview.html#DropIndicatorPosition-enum">DropIndicatorPosition</a></span> QAbstractItemView::<span class="name">dropIndicatorPosition</span>() const</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>
<!-- @@@dropIndicatorPosition -->
<!-- $$$edit[overload1]$$$editconstQModelIndex& -->
<h3 class="fn" id="edit"><a name="edit"></a><code>[slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">edit</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</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><b>See also </b><a href="../qtcore/qmodelindex.html#flags">QModelIndex::flags</a>().</p>
<!-- @@@edit -->
<!-- $$$edit$$$editconstQModelIndex&EditTriggerQEvent* -->
<h3 class="fn" id="edit-1"><a name="edit-1"></a><code>[virtual protected] </code><span class="type">bool</span> QAbstractItemView::<span class="name">edit</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>, <span class="type"><a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a></span> <i>trigger</i>, <span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>event</i>)</h3>
<p>Starts editing the item at <i>index</i>, creating an editor if necessary, and returns <code>true</code> if the view's <a href="qabstractitemview.html#State-enum">State</a> is now <a href="qabstractitemview.html#State-enum">EditingState</a>; otherwise returns <code>false</code>.</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><b>See also </b><a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
<!-- @@@edit -->
<!-- $$$editorDestroyed[overload1]$$$editorDestroyedQObject* -->
<h3 class="fn" id="editorDestroyed"><a name="editorDestroyed"></a><code>[virtual protected slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">editorDestroyed</span>(<span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i>editor</i>)</h3>
<p>This function is called when the given <i>editor</i> has been destroyed.</p>
<p><b>See also </b><a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
<!-- @@@editorDestroyed -->
<!-- $$$entered[overload1]$$$enteredconstQModelIndex& -->
<h3 class="fn" id="entered"><a name="entered"></a><code>[signal] </code><span class="type">void</span> QAbstractItemView::<span class="name">entered</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</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><b>See also </b><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>
<!-- @@@entered -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[virtual protected] </code><span class="type">bool</span> QAbstractItemView::<span class="name">event</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="../qtcore/qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$executeDelayedItemsLayout[overload1]$$$executeDelayedItemsLayout -->
<h3 class="fn" id="executeDelayedItemsLayout"><a name="executeDelayedItemsLayout"></a><code>[protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">executeDelayedItemsLayout</span>()</h3>
<p>Executes the scheduled layouts without waiting for the event processing to begin.</p>
<p><b>See also </b><a href="qabstractitemview.html#scheduleDelayedItemsLayout">scheduleDelayedItemsLayout</a>().</p>
<!-- @@@executeDelayedItemsLayout -->
<!-- $$$focusInEvent[overload1]$$$focusInEventQFocusEvent* -->
<h3 class="fn" id="focusInEvent"><a name="focusInEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">focusInEvent</span>(<span class="type"><a href="../qtgui/qfocusevent.html">QFocusEvent</a></span> *<i>event</i>)</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><b>See also </b><a href="qwidget.html#setFocus-1">setFocus</a>() and <a href="qabstractitemview.html#focusOutEvent">focusOutEvent</a>().</p>
<!-- @@@focusInEvent -->
<!-- $$$focusNextPrevChild[overload1]$$$focusNextPrevChildbool -->
<h3 class="fn" id="focusNextPrevChild"><a name="focusNextPrevChild"></a><code>[virtual protected] </code><span class="type">bool</span> QAbstractItemView::<span class="name">focusNextPrevChild</span>(<span class="type">bool</span> <i>next</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#focusNextPrevChild">QWidget::focusNextPrevChild</a>().</p>
<!-- @@@focusNextPrevChild -->
<!-- $$$focusOutEvent[overload1]$$$focusOutEventQFocusEvent* -->
<h3 class="fn" id="focusOutEvent"><a name="focusOutEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">focusOutEvent</span>(<span class="type"><a href="../qtgui/qfocusevent.html">QFocusEvent</a></span> *<i>event</i>)</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><b>See also </b><a href="qwidget.html#clearFocus">clearFocus</a>() and <a href="qabstractitemview.html#focusInEvent">focusInEvent</a>().</p>
<!-- @@@focusOutEvent -->
<!-- $$$horizontalOffset[overload1]$$$horizontalOffset -->
<h3 class="fn" id="horizontalOffset"><a name="horizontalOffset"></a><code>[pure virtual protected] </code><span class="type">int</span> QAbstractItemView::<span class="name">horizontalOffset</span>() const</h3>
<p>Returns the horizontal offset of the view.</p>
<p>In the base class this is a pure virtual function.</p>
<p><b>See also </b><a href="qabstractitemview.html#verticalOffset">verticalOffset</a>().</p>
<!-- @@@horizontalOffset -->
<!-- $$$indexAt[overload1]$$$indexAtconstQPoint& -->
<h3 class="fn" id="indexAt"><a name="indexAt"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QAbstractItemView::<span class="name">indexAt</span>(const <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> &amp;<i>point</i>) const</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><b>See also </b><a href="qabstractitemview.html#visualRect">visualRect</a>().</p>
<!-- @@@indexAt -->
<!-- $$$indexWidget[overload1]$$$indexWidgetconstQModelIndex& -->
<h3 class="fn" id="indexWidget"><a name="indexWidget"></a><span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *QAbstractItemView::<span class="name">indexWidget</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &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><b>See also </b><a href="qabstractitemview.html#setIndexWidget">setIndexWidget</a>().</p>
<!-- @@@indexWidget -->
<!-- $$$inputMethodEvent[overload1]$$$inputMethodEventQInputMethodEvent* -->
<h3 class="fn" id="inputMethodEvent"><a name="inputMethodEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">inputMethodEvent</span>(<span class="type"><a href="../qtgui/qinputmethodevent.html">QInputMethodEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodEvent">QWidget::inputMethodEvent</a>().</p>
<!-- @@@inputMethodEvent -->
<!-- $$$inputMethodQuery[overload1]$$$inputMethodQueryQt::InputMethodQuery -->
<h3 class="fn" id="inputMethodQuery"><a name="inputMethodQuery"></a><code>[virtual] </code><span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> QAbstractItemView::<span class="name">inputMethodQuery</span>(<span class="type"><a href="../qtcore/qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a></span> <i>query</i>) const</h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodQuery">QWidget::inputMethodQuery</a>().</p>
<!-- @@@inputMethodQuery -->
<!-- $$$isIndexHidden[overload1]$$$isIndexHiddenconstQModelIndex& -->
<h3 class="fn" id="isIndexHidden"><a name="isIndexHidden"></a><code>[pure virtual protected] </code><span class="type">bool</span> QAbstractItemView::<span class="name">isIndexHidden</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Returns <code>true</code> if the item referred to by the given <i>index</i> is hidden in the view, otherwise returns <code>false</code>.</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>
<!-- @@@isIndexHidden -->
<!-- $$$itemDelegate[overload1]$$$itemDelegate -->
<h3 class="fn" id="itemDelegate"><a name="itemDelegate"></a><span class="type"><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a></span> *QAbstractItemView::<span class="name">itemDelegate</span>() 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><b>See also </b><a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>().</p>
<!-- @@@itemDelegate -->
<!-- $$$itemDelegate$$$itemDelegateconstQModelIndex& -->
<h3 class="fn" id="itemDelegate-1"><a name="itemDelegate-1"></a><span class="type"><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a></span> *QAbstractItemView::<span class="name">itemDelegate</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Returns the item delegate used by this view and model for the given <i>index</i>.</p>
<!-- @@@itemDelegate -->
<!-- $$$itemDelegateForColumn[overload1]$$$itemDelegateForColumnint -->
<h3 class="fn" id="itemDelegateForColumn"><a name="itemDelegateForColumn"></a><span class="type"><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a></span> *QAbstractItemView::<span class="name">itemDelegateForColumn</span>(<span class="type">int</span> <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><b>See also </b><a href="qabstractitemview.html#setItemDelegateForColumn">setItemDelegateForColumn</a>(), <a href="qabstractitemview.html#itemDelegateForRow">itemDelegateForRow</a>(), and <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
<!-- @@@itemDelegateForColumn -->
<!-- $$$itemDelegateForRow[overload1]$$$itemDelegateForRowint -->
<h3 class="fn" id="itemDelegateForRow"><a name="itemDelegateForRow"></a><span class="type"><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a></span> *QAbstractItemView::<span class="name">itemDelegateForRow</span>(<span class="type">int</span> <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><b>See also </b><a href="qabstractitemview.html#setItemDelegateForRow">setItemDelegateForRow</a>(), <a href="qabstractitemview.html#itemDelegateForColumn">itemDelegateForColumn</a>(), and <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>().</p>
<!-- @@@itemDelegateForRow -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn" id="keyPressEvent"><a name="keyPressEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">keyPressEvent</span>(<span class="type"><a href="../qtgui/qkeyevent.html">QKeyEvent</a></span> *<i>event</i>)</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><b>See also </b><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>
<!-- @@@keyPressEvent -->
<!-- $$$keyboardSearch[overload1]$$$keyboardSearchconstQString& -->
<h3 class="fn" id="keyboardSearch"><a name="keyboardSearch"></a><code>[virtual] </code><span class="type">void</span> QAbstractItemView::<span class="name">keyboardSearch</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>search</i>)</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>
<!-- @@@keyboardSearch -->
<!-- $$$model[overload1]$$$model -->
<h3 class="fn" id="model"><a name="model"></a><span class="type"><a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a></span> *QAbstractItemView::<span class="name">model</span>() const</h3>
<p>Returns the model that this view is presenting.</p>
<p><b>See also </b><a href="qabstractitemview.html#setModel">setModel</a>().</p>
<!-- @@@model -->
<!-- $$$mouseDoubleClickEvent[overload1]$$$mouseDoubleClickEventQMouseEvent* -->
<h3 class="fn" id="mouseDoubleClickEvent"><a name="mouseDoubleClickEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">mouseDoubleClickEvent</span>(<span class="type"><a href="../qtgui/qmouseevent.html">QMouseEvent</a></span> *<i>event</i>)</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>
<!-- @@@mouseDoubleClickEvent -->
<!-- $$$mouseMoveEvent[overload1]$$$mouseMoveEventQMouseEvent* -->
<h3 class="fn" id="mouseMoveEvent"><a name="mouseMoveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">mouseMoveEvent</span>(<span class="type"><a href="../qtgui/qmouseevent.html">QMouseEvent</a></span> *<i>event</i>)</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>
<!-- @@@mouseMoveEvent -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn" id="mousePressEvent"><a name="mousePressEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">mousePressEvent</span>(<span class="type"><a href="../qtgui/qmouseevent.html">QMouseEvent</a></span> *<i>event</i>)</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>
<!-- @@@mousePressEvent -->
<!-- $$$mouseReleaseEvent[overload1]$$$mouseReleaseEventQMouseEvent* -->
<h3 class="fn" id="mouseReleaseEvent"><a name="mouseReleaseEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">mouseReleaseEvent</span>(<span class="type"><a href="../qtgui/qmouseevent.html">QMouseEvent</a></span> *<i>event</i>)</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>
<!-- @@@mouseReleaseEvent -->
<!-- $$$moveCursor[overload1]$$$moveCursorCursorActionQt::KeyboardModifiers -->
<h3 class="fn" id="moveCursor"><a name="moveCursor"></a><code>[pure virtual protected] </code><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QAbstractItemView::<span class="name">moveCursor</span>(<span class="type"><a href="qabstractitemview.html#CursorAction-enum">CursorAction</a></span> <i>cursorAction</i>, <span class="type"><a href="../qtcore/qt.html#KeyboardModifier-enum">Qt::KeyboardModifiers</a></span> <i>modifiers</i>)</h3>
<p>Returns a <a href="../qtcore/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>
<!-- @@@moveCursor -->
<!-- $$$openPersistentEditor[overload1]$$$openPersistentEditorconstQModelIndex& -->
<h3 class="fn" id="openPersistentEditor"><a name="openPersistentEditor"></a><span class="type">void</span> QAbstractItemView::<span class="name">openPersistentEditor</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &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><b>See also </b><a href="qabstractitemview.html#closePersistentEditor">closePersistentEditor</a>().</p>
<!-- @@@openPersistentEditor -->
<!-- $$$pressed[overload1]$$$pressedconstQModelIndex& -->
<h3 class="fn" id="pressed"><a name="pressed"></a><code>[signal] </code><span class="type">void</span> QAbstractItemView::<span class="name">pressed</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</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="../qtgui/qguiapplication.html#mouseButtons">QApplication::mouseButtons</a>() function to get the state of the mouse buttons.</p>
<p><b>See also </b><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>
<!-- @@@pressed -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn" id="reset"><a name="reset"></a><code>[virtual slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">reset</span>()</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>
<!-- @@@reset -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn" id="resizeEvent"><a name="resizeEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">resizeEvent</span>(<span class="type"><a href="../qtgui/qresizeevent.html">QResizeEvent</a></span> *<i>event</i>)</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><b>See also </b><a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$rootIndex[overload1]$$$rootIndex -->
<h3 class="fn" id="rootIndex"><a name="rootIndex"></a><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QAbstractItemView::<span class="name">rootIndex</span>() 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><b>See also </b><a href="qabstractitemview.html#setRootIndex">setRootIndex</a>().</p>
<!-- @@@rootIndex -->
<!-- $$$rowsAboutToBeRemoved[overload1]$$$rowsAboutToBeRemovedconstQModelIndex&intint -->
<h3 class="fn" id="rowsAboutToBeRemoved"><a name="rowsAboutToBeRemoved"></a><code>[virtual protected slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">rowsAboutToBeRemoved</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i>, <span class="type">int</span> <i>start</i>, <span class="type">int</span> <i>end</i>)</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><b>See also </b><a href="qabstractitemview.html#rowsInserted">rowsInserted</a>().</p>
<!-- @@@rowsAboutToBeRemoved -->
<!-- $$$rowsInserted[overload1]$$$rowsInsertedconstQModelIndex&intint -->
<h3 class="fn" id="rowsInserted"><a name="rowsInserted"></a><code>[virtual protected slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">rowsInserted</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i>, <span class="type">int</span> <i>start</i>, <span class="type">int</span> <i>end</i>)</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><b>See also </b><a href="qabstractitemview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a>().</p>
<!-- @@@rowsInserted -->
<!-- $$$scheduleDelayedItemsLayout[overload1]$$$scheduleDelayedItemsLayout -->
<h3 class="fn" id="scheduleDelayedItemsLayout"><a name="scheduleDelayedItemsLayout"></a><code>[protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">scheduleDelayedItemsLayout</span>()</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><b>See also </b><a href="qabstractitemview.html#executeDelayedItemsLayout">executeDelayedItemsLayout</a>().</p>
<!-- @@@scheduleDelayedItemsLayout -->
<!-- $$$scrollDirtyRegion[overload1]$$$scrollDirtyRegionintint -->
<h3 class="fn" id="scrollDirtyRegion"><a name="scrollDirtyRegion"></a><code>[protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">scrollDirtyRegion</span>(<span class="type">int</span> <i>dx</i>, <span class="type">int</span> <i>dy</i>)</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><b>See also </b><a href="qabstractscrollarea.html#scrollContentsBy">scrollContentsBy</a>(), <a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a>(), and <a href="qabstractitemview.html#setDirtyRegion">setDirtyRegion</a>().</p>
<!-- @@@scrollDirtyRegion -->
<!-- $$$scrollTo[overload1]$$$scrollToconstQModelIndex&ScrollHint -->
<h3 class="fn" id="scrollTo"><a name="scrollTo"></a><code>[pure virtual] </code><span class="type">void</span> QAbstractItemView::<span class="name">scrollTo</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>, <span class="type"><a href="qabstractitemview.html#ScrollHint-enum">ScrollHint</a></span> <i>hint</i> = EnsureVisible)</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>
<!-- @@@scrollTo -->
<!-- $$$scrollToBottom[overload1]$$$scrollToBottom -->
<h3 class="fn" id="scrollToBottom"><a name="scrollToBottom"></a><code>[slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">scrollToBottom</span>()</h3>
<p>Scrolls the view to the bottom.</p>
<p>This function was introduced in  Qt 4.1.</p>
<p><b>See also </b><a href="qabstractitemview.html#scrollTo">scrollTo</a>() and <a href="qabstractitemview.html#scrollToTop">scrollToTop</a>().</p>
<!-- @@@scrollToBottom -->
<!-- $$$scrollToTop[overload1]$$$scrollToTop -->
<h3 class="fn" id="scrollToTop"><a name="scrollToTop"></a><code>[slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">scrollToTop</span>()</h3>
<p>Scrolls the view to the top.</p>
<p>This function was introduced in  Qt 4.1.</p>
<p><b>See also </b><a href="qabstractitemview.html#scrollTo">scrollTo</a>() and <a href="qabstractitemview.html#scrollToBottom">scrollToBottom</a>().</p>
<!-- @@@scrollToTop -->
<!-- $$$selectAll[overload1]$$$selectAll -->
<h3 class="fn" id="selectAll"><a name="selectAll"></a><code>[virtual slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">selectAll</span>()</h3>
<p>Selects all items in the view. This function will use the selection behavior set on the view when selecting.</p>
<p><b>See also </b><a href="qabstractitemview.html#setSelection">setSelection</a>(), <a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a>(), and <a href="qabstractitemview.html#clearSelection">clearSelection</a>().</p>
<!-- @@@selectAll -->
<!-- $$$selectedIndexes[overload1]$$$selectedIndexes -->
<h3 class="fn" id="selectedIndexes"><a name="selectedIndexes"></a><code>[virtual protected] </code><span class="type"><a href="../qtcore/qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a></span> QAbstractItemView::<span class="name">selectedIndexes</span>() const</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><b>See also </b><a href="../qtcore/qitemselectionmodel.html#selectedIndexes">QItemSelectionModel::selectedIndexes</a>().</p>
<!-- @@@selectedIndexes -->
<!-- $$$selectionChanged[overload1]$$$selectionChangedconstQItemSelection&constQItemSelection& -->
<h3 class="fn" id="selectionChanged"><a name="selectionChanged"></a><code>[virtual protected slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">selectionChanged</span>(const <span class="type"><a href="../qtcore/qitemselection.html">QItemSelection</a></span> &amp;<i>selected</i>, const <span class="type"><a href="../qtcore/qitemselection.html">QItemSelection</a></span> &amp;<i>deselected</i>)</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><b>See also </b><a href="qabstractitemview.html#setSelection">setSelection</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$selectionCommand[overload1]$$$selectionCommandconstQModelIndex&constQEvent* -->
<h3 class="fn" id="selectionCommand"><a name="selectionCommand"></a><code>[virtual protected] </code><span class="type"><a href="../qtcore/qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a></span> QAbstractItemView::<span class="name">selectionCommand</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>, const <span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>event</i> = Q_NULLPTR) const</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><b>See also </b><a href="qabstractitemview.html#setSelection">setSelection</a>().</p>
<!-- @@@selectionCommand -->
<!-- $$$selectionModel[overload1]$$$selectionModel -->
<h3 class="fn" id="selectionModel"><a name="selectionModel"></a><span class="type"><a href="../qtcore/qitemselectionmodel.html">QItemSelectionModel</a></span> *QAbstractItemView::<span class="name">selectionModel</span>() const</h3>
<p>Returns the current selection model.</p>
<p><b>See also </b><a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>() and <a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a>().</p>
<!-- @@@selectionModel -->
<!-- $$$setCurrentIndex[overload1]$$$setCurrentIndexconstQModelIndex& -->
<h3 class="fn" id="setCurrentIndex"><a name="setCurrentIndex"></a><code>[slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">setCurrentIndex</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</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 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><code>selectionModel()-&gt;setCurrentIndex(index, QItemSelectionModel::NoUpdate);</code></p>
<p><b>See also </b><a href="qabstractitemview.html#currentIndex">currentIndex</a>(), <a href="qabstractitemview.html#currentChanged">currentChanged</a>(), and <a href="qabstractitemview.html#selectionMode-prop">selectionMode</a>.</p>
<!-- @@@setCurrentIndex -->
<!-- $$$setDirtyRegion[overload1]$$$setDirtyRegionconstQRegion& -->
<h3 class="fn" id="setDirtyRegion"><a name="setDirtyRegion"></a><code>[protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">setDirtyRegion</span>(const <span class="type"><a href="../qtgui/qregion.html">QRegion</a></span> &amp;<i>region</i>)</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><b>See also </b><a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>() and <a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a>().</p>
<!-- @@@setDirtyRegion -->
<!-- $$$setIndexWidget[overload1]$$$setIndexWidgetconstQModelIndex&QWidget* -->
<h3 class="fn" id="setIndexWidget"><a name="setIndexWidget"></a><span class="type">void</span> QAbstractItemView::<span class="name">setIndexWidget</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>, <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<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 class="cpp">

  setIndexWidget(index<span class="operator">,</span> <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>);
  <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  setIndexWidget(index<span class="operator">,</span> <span class="keyword">new</span> <span class="type"><a href="qtextedit.html">QTextEdit</a></span>);

</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><b>See also </b><a href="qabstractitemview.html#indexWidget">indexWidget</a>() and <a href="model-view-programming.html#delegate-classes">Delegate Classes</a>.</p>
<!-- @@@setIndexWidget -->
<!-- $$$setItemDelegate[overload1]$$$setItemDelegateQAbstractItemDelegate* -->
<h3 class="fn" id="setItemDelegate"><a name="setItemDelegate"></a><span class="type">void</span> QAbstractItemView::<span class="name">setItemDelegate</span>(<span class="type"><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a></span> *<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><b>See also </b><a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
<!-- @@@setItemDelegate -->
<!-- $$$setItemDelegateForColumn[overload1]$$$setItemDelegateForColumnintQAbstractItemDelegate* -->
<h3 class="fn" id="setItemDelegateForColumn"><a name="setItemDelegateForColumn"></a><span class="type">void</span> QAbstractItemView::<span class="name">setItemDelegateForColumn</span>(<span class="type">int</span> <i>column</i>, <span class="type"><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a></span> *<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 precedence 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><b>See also </b><a href="qabstractitemview.html#itemDelegateForColumn">itemDelegateForColumn</a>(), <a href="qabstractitemview.html#setItemDelegateForRow">setItemDelegateForRow</a>(), and <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
<!-- @@@setItemDelegateForColumn -->
<!-- $$$setItemDelegateForRow[overload1]$$$setItemDelegateForRowintQAbstractItemDelegate* -->
<h3 class="fn" id="setItemDelegateForRow"><a name="setItemDelegateForRow"></a><span class="type">void</span> QAbstractItemView::<span class="name">setItemDelegateForRow</span>(<span class="type">int</span> <i>row</i>, <span class="type"><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a></span> *<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 precedence 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><b>See also </b><a href="qabstractitemview.html#itemDelegateForRow">itemDelegateForRow</a>(), <a href="qabstractitemview.html#setItemDelegateForColumn">setItemDelegateForColumn</a>(), and <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
<!-- @@@setItemDelegateForRow -->
<!-- $$$setModel[overload1]$$$setModelQAbstractItemModel* -->
<h3 class="fn" id="setModel"><a name="setModel"></a><code>[virtual] </code><span class="type">void</span> QAbstractItemView::<span class="name">setModel</span>(<span class="type"><a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a></span> *<i>model</i>)</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 class="cpp">

  <span class="type"><a href="../qtcore/qitemselectionmodel.html">QItemSelectionModel</a></span> <span class="operator">*</span>m <span class="operator">=</span> view<span class="operator">-</span><span class="operator">&gt;</span>selectionModel();
  view<span class="operator">-</span><span class="operator">&gt;</span>setModel(<span class="keyword">new</span> model);
  <span class="keyword">delete</span> 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="../qtcore/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 model may be shared between many different views.</p>
<p><b>See also </b><a href="qabstractitemview.html#model">model</a>(), <a href="qabstractitemview.html#selectionModel">selectionModel</a>(), and <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>().</p>
<!-- @@@setModel -->
<!-- $$$setRootIndex[overload1]$$$setRootIndexconstQModelIndex& -->
<h3 class="fn" id="setRootIndex"><a name="setRootIndex"></a><code>[virtual slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">setRootIndex</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</h3>
<p>Sets the root item to the item at the given <i>index</i>.</p>
<p><b>See also </b><a href="qabstractitemview.html#rootIndex">rootIndex</a>().</p>
<!-- @@@setRootIndex -->
<!-- $$$setSelection[overload1]$$$setSelectionconstQRect&QItemSelectionModel::SelectionFlags -->
<h3 class="fn" id="setSelection"><a name="setSelection"></a><code>[pure virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">setSelection</span>(const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>rect</i>, <span class="type"><a href="../qtcore/qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a></span> <i>flags</i>)</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="../qtcore/qmodelindex.html">QModelIndex</a> or a <a href="../qtcore/qitemselection.html">QItemSelection</a> that contains all items that are contained in <i>rect</i>.</p>
<p><b>See also </b><a href="qabstractitemview.html#selectionCommand">selectionCommand</a>() and <a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a>().</p>
<!-- @@@setSelection -->
<!-- $$$setSelectionModel[overload1]$$$setSelectionModelQItemSelectionModel* -->
<h3 class="fn" id="setSelectionModel"><a name="setSelectionModel"></a><code>[virtual] </code><span class="type">void</span> QAbstractItemView::<span class="name">setSelectionModel</span>(<span class="type"><a href="../qtcore/qitemselectionmodel.html">QItemSelectionModel</a></span> *<i>selectionModel</i>)</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="../qtcore/qobject.html#deleteLater">deleteLater</a>() function to explicitly delete it.</p><p><b>See also </b><a href="qabstractitemview.html#selectionModel">selectionModel</a>(), <a href="qabstractitemview.html#setModel">setModel</a>(), and <a href="qabstractitemview.html#clearSelection">clearSelection</a>().</p>
<!-- @@@setSelectionModel -->
<!-- $$$setState[overload1]$$$setStateState -->
<h3 class="fn" id="setState"><a name="setState"></a><code>[protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">setState</span>(<span class="type"><a href="qabstractitemview.html#State-enum">State</a></span> <i>state</i>)</h3>
<p>Sets the item view's state to the given <i>state</i>.</p>
<p><b>See also </b><a href="qabstractitemview.html#state">state</a>().</p>
<!-- @@@setState -->
<!-- $$$sizeHintForColumn[overload1]$$$sizeHintForColumnint -->
<h3 class="fn" id="sizeHintForColumn"><a name="sizeHintForColumn"></a><code>[virtual] </code><span class="type">int</span> QAbstractItemView::<span class="name">sizeHintForColumn</span>(<span class="type">int</span> <i>column</i>) const</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><b>See also </b><a href="qabstractitemview.html#sizeHintForRow">sizeHintForRow</a>().</p>
<!-- @@@sizeHintForColumn -->
<!-- $$$sizeHintForIndex[overload1]$$$sizeHintForIndexconstQModelIndex& -->
<h3 class="fn" id="sizeHintForIndex"><a name="sizeHintForIndex"></a><span class="type"><a href="../qtcore/qsize.html">QSize</a></span> QAbstractItemView::<span class="name">sizeHintForIndex</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &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><b>See also </b><a href="qabstractitemview.html#sizeHintForRow">sizeHintForRow</a>() and <a href="qabstractitemview.html#sizeHintForColumn">sizeHintForColumn</a>().</p>
<!-- @@@sizeHintForIndex -->
<!-- $$$sizeHintForRow[overload1]$$$sizeHintForRowint -->
<h3 class="fn" id="sizeHintForRow"><a name="sizeHintForRow"></a><code>[virtual] </code><span class="type">int</span> QAbstractItemView::<span class="name">sizeHintForRow</span>(<span class="type">int</span> <i>row</i>) const</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><b>See also </b><a href="qabstractitemview.html#sizeHintForColumn">sizeHintForColumn</a>().</p>
<!-- @@@sizeHintForRow -->
<!-- $$$startDrag[overload1]$$$startDragQt::DropActions -->
<h3 class="fn" id="startDrag"><a name="startDrag"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">startDrag</span>(<span class="type"><a href="../qtcore/qt.html#DropAction-enum">Qt::DropActions</a></span> <i>supportedActions</i>)</h3>
<p>Starts a drag by calling drag-&gt;exec() using the given <i>supportedActions</i>.</p>
<!-- @@@startDrag -->
<!-- $$$state[overload1]$$$state -->
<h3 class="fn" id="state"><a name="state"></a><code>[protected] </code><span class="type"><a href="qabstractitemview.html#State-enum">State</a></span> QAbstractItemView::<span class="name">state</span>() const</h3>
<p>Returns the item view's state.</p>
<p><b>See also </b><a href="qabstractitemview.html#setState">setState</a>().</p>
<!-- @@@state -->
<!-- $$$timerEvent[overload1]$$$timerEventQTimerEvent* -->
<h3 class="fn" id="timerEvent"><a name="timerEvent"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractItemView::<span class="name">timerEvent</span>(<span class="type"><a href="../qtcore/qtimerevent.html">QTimerEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="../qtcore/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><b>See also </b><a href="../qtcore/qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<!-- @@@timerEvent -->
<!-- $$$update[overload1]$$$updateconstQModelIndex& -->
<h3 class="fn" id="update"><a name="update"></a><code>[slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">update</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</h3>
<p>Updates the area occupied by the given <i>index</i>.</p>
<p>This function was introduced in  Qt 4.3.</p>
<!-- @@@update -->
<!-- $$$updateGeometries[overload1]$$$updateGeometries -->
<h3 class="fn" id="updateGeometries"><a name="updateGeometries"></a><code>[virtual protected slot] </code><span class="type">void</span> QAbstractItemView::<span class="name">updateGeometries</span>()</h3>
<p>Updates the geometry of the child widgets of the view.</p>
<p>This function was introduced in  Qt 4.4.</p>
<!-- @@@updateGeometries -->
<!-- $$$verticalOffset[overload1]$$$verticalOffset -->
<h3 class="fn" id="verticalOffset"><a name="verticalOffset"></a><code>[pure virtual protected] </code><span class="type">int</span> QAbstractItemView::<span class="name">verticalOffset</span>() const</h3>
<p>Returns the vertical offset of the view.</p>
<p>In the base class this is a pure virtual function.</p>
<p><b>See also </b><a href="qabstractitemview.html#horizontalOffset">horizontalOffset</a>().</p>
<!-- @@@verticalOffset -->
<!-- $$$viewOptions[overload1]$$$viewOptions -->
<h3 class="fn" id="viewOptions"><a name="viewOptions"></a><code>[virtual protected] </code><span class="type"><a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a></span> QAbstractItemView::<span class="name">viewOptions</span>() const</h3>
<p>Returns a <a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a> structure populated with the view's palette, font, state, alignments etc.</p>
<!-- @@@viewOptions -->
<!-- $$$viewportEntered[overload1]$$$viewportEntered -->
<h3 class="fn" id="viewportEntered"><a name="viewportEntered"></a><code>[signal] </code><span class="type">void</span> QAbstractItemView::<span class="name">viewportEntered</span>()</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><b>See also </b><a href="qabstractitemview.html#entered">entered</a>().</p>
<!-- @@@viewportEntered -->
<!-- $$$viewportEvent[overload1]$$$viewportEventQEvent* -->
<h3 class="fn" id="viewportEvent"><a name="viewportEvent"></a><code>[virtual protected] </code><span class="type">bool</span> QAbstractItemView::<span class="name">viewportEvent</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>event</i>)</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="../qtcore/qevent.html#Type-enum">QEvent::ToolTip</a>,or a <a href="../qtcore/qevent.html#Type-enum">QEvent::WhatsThis</a>. It passes all other events on to its base class viewportEvent() handler.</p>
<!-- @@@viewportEvent -->
<!-- $$$viewportSizeHint[overload1]$$$viewportSizeHint -->
<h3 class="fn" id="viewportSizeHint"><a name="viewportSizeHint"></a><code>[virtual protected] </code><span class="type"><a href="../qtcore/qsize.html">QSize</a></span> QAbstractItemView::<span class="name">viewportSizeHint</span>() const</h3>
<p>Reimplemented from <a href="qabstractscrollarea.html#viewportSizeHint">QAbstractScrollArea::viewportSizeHint</a>().</p>
<p>This function was introduced in  Qt 5.2.</p>
<!-- @@@viewportSizeHint -->
<!-- $$$visualRect[overload1]$$$visualRectconstQModelIndex& -->
<h3 class="fn" id="visualRect"><a name="visualRect"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QAbstractItemView::<span class="name">visualRect</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</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><b>See also </b><a href="qabstractitemview.html#indexAt">indexAt</a>() and <a href="qabstractitemview.html#visualRegionForSelection">visualRegionForSelection</a>().</p>
<!-- @@@visualRect -->
<!-- $$$visualRegionForSelection[overload1]$$$visualRegionForSelectionconstQItemSelection& -->
<h3 class="fn" id="visualRegionForSelection"><a name="visualRegionForSelection"></a><code>[pure virtual protected] </code><span class="type"><a href="../qtgui/qregion.html">QRegion</a></span> QAbstractItemView::<span class="name">visualRegionForSelection</span>(const <span class="type"><a href="../qtcore/qitemselection.html">QItemSelection</a></span> &amp;<i>selection</i>) const</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><b>See also </b><a href="qabstractitemview.html#visualRect">visualRect</a>() and <a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a>().</p>
<!-- @@@visualRegionForSelection -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>