Sophie

Sophie

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

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" />
<!-- qtreeview.cpp -->
  <title>QTreeView 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 >QTreeView</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="#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-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>
<li class="level2"><a href="#key-bindings">Key Bindings</a></li>
<li class="level2"><a href="#improving-performance">Improving Performance</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QTreeView Class</h1>
<!-- $$$QTreeView-brief -->
<p>The <a href="qtreeview.html">QTreeView</a> class provides a default model/view implementation of a tree view. <a href="#details">More...</a></p>
<!-- @@@QTreeView -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QTreeView&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="qabstractitemview.html">QAbstractItemView</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qtreewidget.html">QTreeWidget</a></p>
</td></tr></table></div><ul>
<li><a href="qtreeview-members.html">List of all members, including inherited members</a></li>
<li><a href="qtreeview-obsolete.html">Obsolete members</a></li>
</ul>
<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="qtreeview.html#allColumnsShowFocus-prop">allColumnsShowFocus</a></b> : bool</li>
<li class="fn"><b><a href="qtreeview.html#animated-prop">animated</a></b> : bool</li>
<li class="fn"><b><a href="qtreeview.html#autoExpandDelay-prop">autoExpandDelay</a></b> : int</li>
<li class="fn"><b><a href="qtreeview.html#expandsOnDoubleClick-prop">expandsOnDoubleClick</a></b> : bool</li>
<li class="fn"><b><a href="qtreeview.html#headerHidden-prop">headerHidden</a></b> : bool</li>
<li class="fn"><b><a href="qtreeview.html#indentation-prop">indentation</a></b> : int</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qtreeview.html#itemsExpandable-prop">itemsExpandable</a></b> : bool</li>
<li class="fn"><b><a href="qtreeview.html#rootIsDecorated-prop">rootIsDecorated</a></b> : bool</li>
<li class="fn"><b><a href="qtreeview.html#sortingEnabled-prop">sortingEnabled</a></b> : bool</li>
<li class="fn"><b><a href="qtreeview.html#uniformRowHeights-prop">uniformRowHeights</a></b> : bool</li>
<li class="fn"><b><a href="qtreeview.html#wordWrap-prop">wordWrap</a></b> : bool</li>
</ul>
</td></tr>
</table></div>
<ul>
<li class="fn">16 properties inherited from <a href="qabstractitemview.html#properties">QAbstractItemView</a></li>
<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="qtreeview.html#QTreeView">QTreeView</a></b>(QWidget *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#dtor.QTreeView">~QTreeView</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#allColumnsShowFocus-prop">allColumnsShowFocus</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#autoExpandDelay-prop">autoExpandDelay</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#columnAt">columnAt</a></b>(int <i>x</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#columnViewportPosition">columnViewportPosition</a></b>(int <i>column</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#columnWidth">columnWidth</a></b>(int <i>column</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#expandsOnDoubleClick-prop">expandsOnDoubleClick</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QHeaderView *</td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#header">header</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#indentation-prop">indentation</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#indexAbove">indexAbove</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#indexBelow">indexBelow</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#animated-prop">isAnimated</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#isColumnHidden">isColumnHidden</a></b>(int <i>column</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#isExpanded">isExpanded</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#isFirstColumnSpanned">isFirstColumnSpanned</a></b>(int <i>row</i>, const QModelIndex &amp;<i>parent</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#headerHidden-prop">isHeaderHidden</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#isRowHidden">isRowHidden</a></b>(int <i>row</i>, const QModelIndex &amp;<i>parent</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#sortingEnabled-prop">isSortingEnabled</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#itemsExpandable-prop">itemsExpandable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#indentation-prop">resetIndentation</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#rootIsDecorated-prop">rootIsDecorated</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#allColumnsShowFocus-prop">setAllColumnsShowFocus</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#animated-prop">setAnimated</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#autoExpandDelay-prop">setAutoExpandDelay</a></b>(int <i>delay</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#setColumnHidden">setColumnHidden</a></b>(int <i>column</i>, bool <i>hide</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#setColumnWidth">setColumnWidth</a></b>(int <i>column</i>, int <i>width</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#setExpanded">setExpanded</a></b>(const QModelIndex &amp;<i>index</i>, bool <i>expanded</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#expandsOnDoubleClick-prop">setExpandsOnDoubleClick</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#setFirstColumnSpanned">setFirstColumnSpanned</a></b>(int <i>row</i>, const QModelIndex &amp;<i>parent</i>, bool <i>span</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#setHeader">setHeader</a></b>(QHeaderView *<i>header</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#headerHidden-prop">setHeaderHidden</a></b>(bool <i>hide</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#indentation-prop">setIndentation</a></b>(int <i>i</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#itemsExpandable-prop">setItemsExpandable</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#rootIsDecorated-prop">setRootIsDecorated</a></b>(bool <i>show</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#setRowHidden">setRowHidden</a></b>(int <i>row</i>, const QModelIndex &amp;<i>parent</i>, bool <i>hide</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#sortingEnabled-prop">setSortingEnabled</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#setTreePosition">setTreePosition</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#uniformRowHeights-prop">setUniformRowHeights</a></b>(bool <i>uniform</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#wordWrap-prop">setWordWrap</a></b>(bool <i>on</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#sortByColumn">sortByColumn</a></b>(int <i>column</i>, Qt::SortOrder <i>order</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#treePosition">treePosition</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#uniformRowHeights-prop">uniformRowHeights</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#wordWrap-prop">wordWrap</a></b>() const</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 void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.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 QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#indexAt">indexAt</a></b>(const QPoint &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#keyboardSearch">keyboardSearch</a></b>(const QString &amp;<i>search</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#reset">reset</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#scrollTo">scrollTo</a></b>(const QModelIndex &amp;<i>index</i>, ScrollHint <i>hint</i> = EnsureVisible)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#selectAll">selectAll</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#setModel">setModel</a></b>(QAbstractItemModel *<i>model</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#setRootIndex">setRootIndex</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="qtreeview.html#setSelectionModel">setSelectionModel</a></b>(QItemSelectionModel *<i>selectionModel</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRect </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#visualRect">visualRect</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
</table></div>
<ul>
<li class="fn">59 public functions inherited from <a href="qabstractitemview.html#public-functions">QAbstractItemView</a></li>
<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="qtreeview.html#collapse">collapse</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="qtreeview.html#collapseAll">collapseAll</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#expand">expand</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="qtreeview.html#expandAll">expandAll</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#expandToDepth">expandToDepth</a></b>(int <i>depth</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#hideColumn">hideColumn</a></b>(int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#resizeColumnToContents">resizeColumnToContents</a></b>(int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#showColumn">showColumn</a></b>(int <i>column</i>)</td></tr>
</table></div>
<ul>
<li class="fn">9 public slots inherited from <a href="qabstractitemview.html#public-slots">QAbstractItemView</a></li>
<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="qtreeview.html#collapsed">collapsed</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="qtreeview.html#expanded">expanded</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
</table></div>
<ul>
<li class="fn">7 signals inherited from <a href="qabstractitemview.html#signals">QAbstractItemView</a></li>
<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-functions"></a>
<h2 id="protected-functions">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="qtreeview.html#drawBranches">drawBranches</a></b>(QPainter *<i>painter</i>, const QRect &amp;<i>rect</i>, const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#drawRow">drawRow</a></b>(QPainter *<i>painter</i>, const QStyleOptionViewItem &amp;<i>option</i>, const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#drawTree">drawTree</a></b>(QPainter *<i>painter</i>, const QRegion &amp;<i>region</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#indexRowSizeHint">indexRowSizeHint</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#rowHeight">rowHeight</a></b>(const QModelIndex &amp;<i>index</i>) const</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="qtreeview.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="qtreeview.html#dragMoveEvent">dragMoveEvent</a></b>(QDragMoveEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#horizontalOffset">horizontalOffset</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#isIndexHidden">isIndexHidden</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.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="qtreeview.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="qtreeview.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="qtreeview.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="qtreeview.html#mouseReleaseEvent">mouseReleaseEvent</a></b>(QMouseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#moveCursor">moveCursor</a></b>(CursorAction <i>cursorAction</i>, Qt::KeyboardModifiers <i>modifiers</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#paintEvent">paintEvent</a></b>(QPaintEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.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="qtreeview.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="qtreeview.html#scrollContentsBy">scrollContentsBy</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="qtreeview.html#selectedIndexes">selectedIndexes</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.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="qtreeview.html#setSelection">setSelection</a></b>(const QRect &amp;<i>rect</i>, QItemSelectionModel::SelectionFlags <i>command</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#sizeHintForColumn">sizeHintForColumn</a></b>(int <i>column</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#timerEvent">timerEvent</a></b>(QTimerEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#updateGeometries">updateGeometries</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#verticalOffset">verticalOffset</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.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="qtreeview.html#viewportSizeHint">viewportSizeHint</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRegion </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#visualRegionForSelection">visualRegionForSelection</a></b>(const QItemSelection &amp;<i>selection</i>) const</td></tr>
</table></div>
<ul>
<li class="fn">37 protected functions inherited from <a href="qabstractitemview.html#protected-functions">QAbstractItemView</a></li>
<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"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#columnCountChanged">columnCountChanged</a></b>(int <i>oldCount</i>, int <i>newCount</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#columnMoved">columnMoved</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#columnResized">columnResized</a></b>(int <i>column</i>, int <i>oldSize</i>, int <i>newSize</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreeview.html#rowsRemoved">rowsRemoved</a></b>(const QModelIndex &amp;<i>parent</i>, int <i>start</i>, int <i>end</i>)</td></tr>
</table></div>
<ul>
<li class="fn">9 protected slots inherited from <a href="qabstractitemview.html#protected-slots">QAbstractItemView</a></li>
<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>
<!-- $$$QTreeView-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qtreeview.html">QTreeView</a> class provides a default model/view implementation of a tree view.</p>
<p class="centerAlign"><img src="images/windows-treeview.png" alt="" /></p><p>A <a href="qtreeview.html">QTreeView</a> implements a tree representation of items from a model. This class is used to provide standard hierarchical lists that were previously provided by the <code>QListView</code> class, but using the more flexible approach provided by Qt's model/view architecture.</p>
<p>The <a href="qtreeview.html">QTreeView</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><a href="qtreeview.html">QTreeView</a> implements the interfaces defined by the <a href="qabstractitemview.html">QAbstractItemView</a> class to allow it to display data provided by models derived from the <a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a> class.</p>
<p>It is simple to construct a tree view displaying data from a model. In the following example, the contents of a directory are supplied by a <a href="qfilesystemmodel.html">QFileSystemModel</a> and displayed as a tree:</p>
<pre class="cpp">

      <span class="type"><a href="qfilesystemmodel.html">QFileSystemModel</a></span> <span class="operator">*</span>model <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qfilesystemmodel.html">QFileSystemModel</a></span>;
      model<span class="operator">-</span><span class="operator">&gt;</span>setRootPath(<span class="type"><a href="../qtcore/qdir.html">QDir</a></span><span class="operator">::</span>currentPath());
      <span class="type"><a href="qtreeview.html#QTreeView">QTreeView</a></span> <span class="operator">*</span>tree <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtreeview.html#QTreeView">QTreeView</a></span>(splitter);
      tree<span class="operator">-</span><span class="operator">&gt;</span>setModel(model);

</pre>
<p>The model/view architecture ensures that the contents of the tree view are updated as the model changes.</p>
<p>Items that have children can be in an expanded (children are visible) or collapsed (children are hidden) state. When this state changes a <a href="qtreeview.html#collapsed">collapsed</a>() or <a href="qtreeview.html#expanded">expanded</a>() signal is emitted with the model index of the relevant item.</p>
<p>The amount of indentation used to indicate levels of hierarchy is controlled by the <a href="qtreeview.html#indentation-prop">indentation</a> property.</p>
<p>Headers in tree views are constructed using the <a href="qheaderview.html">QHeaderView</a> class and can be hidden using <code>header()-&gt;hide()</code>. Note that each header is configured with its <a href="qheaderview.html#stretchLastSection-prop">stretchLastSection</a> property set to true, ensuring that the view does not waste any of the space assigned to it for its header. If this value is set to true, this property will override the resize mode set on the last section in the header.</p>
<p>By default, all columns in a tree view are movable except the first. To disable movement of these columns, use <a href="qheaderview.html">QHeaderView</a>'s <a href="qheaderview.html#setSectionsMovable">setSectionsMovable()</a> function. For more information about rearranging sections, see <a href="qheaderview.html#moving-header-sections">Moving Header Sections</a>.</p>
<a name="key-bindings"></a>
<h3 >Key Bindings</h3>
<p><a href="qtreeview.html">QTreeView</a> supports a set of key bindings that enable the user to navigate in the view and interact with the contents of items:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Key</th><th >Action</th></tr></thead>
<tr valign="top" class="odd"><td >Up</td><td >Moves the cursor to the item in the same column on the previous row. If the parent of the current item has no more rows to navigate to, the cursor moves to the relevant item in the last row of the sibling that precedes the parent.</td></tr>
<tr valign="top" class="even"><td >Down</td><td >Moves the cursor to the item in the same column on the next row. If the parent of the current item has no more rows to navigate to, the cursor moves to the relevant item in the first row of the sibling that follows the parent.</td></tr>
<tr valign="top" class="odd"><td >Left</td><td >Hides the children of the current item (if present) by collapsing a branch.</td></tr>
<tr valign="top" class="even"><td >Minus</td><td >Same as LeftArrow.</td></tr>
<tr valign="top" class="odd"><td >Right</td><td >Reveals the children of the current item (if present) by expanding a branch.</td></tr>
<tr valign="top" class="even"><td >Plus</td><td >Same as RightArrow.</td></tr>
<tr valign="top" class="odd"><td >Asterisk</td><td >Expands all children of the current item (if present).</td></tr>
<tr valign="top" class="even"><td >PageUp</td><td >Moves the cursor up one page.</td></tr>
<tr valign="top" class="odd"><td >PageDown</td><td >Moves the cursor down one page.</td></tr>
<tr valign="top" class="even"><td >Home</td><td >Moves the cursor to an item in the same column of the first row of the first top-level item in the model.</td></tr>
<tr valign="top" class="odd"><td >End</td><td >Moves the cursor to an item in the same column of the last row of the last top-level item in the model.</td></tr>
<tr valign="top" class="even"><td >F2</td><td >In editable models, this opens the current item for editing. The Escape key can be used to cancel the editing process and revert any changes to the data displayed.</td></tr>
</table></div>
<a name="improving-performance"></a>
<h3 >Improving Performance</h3>
<p>It is possible to give the view hints about the data it is handling in order to improve its performance when displaying large numbers of items. One approach that can be taken for views that are intended to display items with equal heights is to set the <a href="qtreeview.html#uniformRowHeights-prop">uniformRowHeights</a> property to true.</p>
</div>
<p><b>See also </b><a href="qlistview.html">QListView</a>, <a href="qtreewidget.html">QTreeWidget</a>, <a href="model-view-programming.html#view-classes">View Classes</a>, <a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a>, <a href="qabstractitemview.html">QAbstractItemView</a>, and <a href="qtwidgets-itemviews-dirview-example.html">Dir View Example</a>.</p>
<!-- @@@QTreeView -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$allColumnsShowFocus-prop$$$allColumnsShowFocus$$$setAllColumnsShowFocusbool -->
<h3 class="fn" id="allColumnsShowFocus-prop"><a name="allColumnsShowFocus-prop"></a><span class="name">allColumnsShowFocus</span> : <span class="type">bool</span></h3>
<p>This property holds whether items should show keyboard focus using all columns</p>
<p>If this property is <code>true</code> all columns will show focus, otherwise only one column will show focus.</p>
<p>The default is false.</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>allColumnsShowFocus</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAllColumnsShowFocus</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<!-- @@@allColumnsShowFocus -->
<!-- $$$animated-prop$$$isAnimated$$$setAnimatedbool -->
<h3 class="fn" id="animated-prop"><a name="animated-prop"></a><span class="name">animated</span> : <span class="type">bool</span></h3>
<p>This property holds whether animations are enabled</p>
<p>If this property is <code>true</code> the treeview will animate expansion and collapsing of branches. If this property is <code>false</code>, the treeview will expand or collapse branches immediately without showing the animation.</p>
<p>By default, this property is <code>false</code>.</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>isAnimated</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAnimated</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<!-- @@@animated -->
<!-- $$$autoExpandDelay-prop$$$autoExpandDelay$$$setAutoExpandDelayint -->
<h3 class="fn" id="autoExpandDelay-prop"><a name="autoExpandDelay-prop"></a><span class="name">autoExpandDelay</span> : <span class="type">int</span></h3>
<p>This property holds the delay time before items in a tree are opened during a drag and drop operation.</p>
<p>This property holds the amount of time in milliseconds that the user must wait over a node before that node will automatically open or close. If the time is set to less then 0 then it will not be activated.</p>
<p>By default, this property has a value of -1, meaning that auto-expansion is disabled.</p>
<p>This property was introduced in  Qt 4.3.</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>autoExpandDelay</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoExpandDelay</b></span>(int <i>delay</i>)</td></tr>
</table></div>
<!-- @@@autoExpandDelay -->
<!-- $$$expandsOnDoubleClick-prop$$$expandsOnDoubleClick$$$setExpandsOnDoubleClickbool -->
<h3 class="fn" id="expandsOnDoubleClick-prop"><a name="expandsOnDoubleClick-prop"></a><span class="name">expandsOnDoubleClick</span> : <span class="type">bool</span></h3>
<p>This property holds whether the items can be expanded by double-clicking.</p>
<p>This property holds whether the user can expand and collapse items by double-clicking. The default value is true.</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"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>expandsOnDoubleClick</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setExpandsOnDoubleClick</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qtreeview.html#itemsExpandable-prop">itemsExpandable</a>.</p>
<!-- @@@expandsOnDoubleClick -->
<!-- $$$headerHidden-prop$$$isHeaderHidden$$$setHeaderHiddenbool -->
<h3 class="fn" id="headerHidden-prop"><a name="headerHidden-prop"></a><span class="name">headerHidden</span> : <span class="type">bool</span></h3>
<p>This property holds whether the header is shown or not.</p>
<p>If this property is <code>true</code>, the header is not shown otherwise it is. The default value is false.</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"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isHeaderHidden</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setHeaderHidden</b></span>(bool <i>hide</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qtreeview.html#header">header</a>().</p>
<!-- @@@headerHidden -->
<!-- $$$indentation-prop$$$indentation$$$setIndentationint$$$resetIndentation -->
<h3 class="fn" id="indentation-prop"><a name="indentation-prop"></a><span class="name">indentation</span> : <span class="type">int</span></h3>
<p>indentation of the items in the tree view.</p>
<p>This property holds the indentation measured in pixels of the items for each level in the tree view. For top-level items, the indentation specifies the horizontal distance from the viewport edge to the items in the first column; for child items, it specifies their indentation from their parent items.</p>
<p>By default, the value of this property is style dependent. Thus, when the style changes, this property updates from it. Calling setIndentation() stops the updates, calling resetIndentation() will restore default behavior.</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>indentation</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setIndentation</b></span>(int <i>i</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>resetIndentation</b></span>()</td></tr>
</table></div>
<!-- @@@indentation -->
<!-- $$$itemsExpandable-prop$$$itemsExpandable$$$setItemsExpandablebool -->
<h3 class="fn" id="itemsExpandable-prop"><a name="itemsExpandable-prop"></a><span class="name">itemsExpandable</span> : <span class="type">bool</span></h3>
<p>This property holds whether the items are expandable by the user.</p>
<p>This property holds whether the user can expand and collapse items interactively.</p>
<p>By default, this property is <code>true</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>itemsExpandable</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setItemsExpandable</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<!-- @@@itemsExpandable -->
<!-- $$$rootIsDecorated-prop$$$rootIsDecorated$$$setRootIsDecoratedbool -->
<h3 class="fn" id="rootIsDecorated-prop"><a name="rootIsDecorated-prop"></a><span class="name">rootIsDecorated</span> : <span class="type">bool</span></h3>
<p>This property holds whether to show controls for expanding and collapsing top-level items</p>
<p>Items with children are typically shown with controls to expand and collapse them, allowing their children to be shown or hidden. If this property is false, these controls are not shown for top-level items. This can be used to make a single level tree structure appear like a simple list of items.</p>
<p>By default, this property is <code>true</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>rootIsDecorated</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setRootIsDecorated</b></span>(bool <i>show</i>)</td></tr>
</table></div>
<!-- @@@rootIsDecorated -->
<!-- $$$sortingEnabled-prop$$$isSortingEnabled$$$setSortingEnabledbool -->
<h3 class="fn" id="sortingEnabled-prop"><a name="sortingEnabled-prop"></a><span class="name">sortingEnabled</span> : <span class="type">bool</span></h3>
<p>This property holds whether sorting is enabled</p>
<p>If this property is <code>true</code>, sorting is enabled for the tree; if the property is false, sorting is not enabled. The default value is false.</p>
<p><b>Note: </b>In order to avoid performance issues, it is recommended that sorting is enabled <i>after</i> inserting the items into the tree. Alternatively, you could also insert the items into a list before inserting the items into the tree.</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>isSortingEnabled</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSortingEnabled</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qtreeview.html#sortByColumn">sortByColumn</a>().</p>
<!-- @@@sortingEnabled -->
<!-- $$$uniformRowHeights-prop$$$uniformRowHeights$$$setUniformRowHeightsbool -->
<h3 class="fn" id="uniformRowHeights-prop"><a name="uniformRowHeights-prop"></a><span class="name">uniformRowHeights</span> : <span class="type">bool</span></h3>
<p>This property holds whether all items in the treeview have the same height</p>
<p>This property should only be set to true if it is guaranteed that all items in the view has the same height. This enables the view to do some optimizations.</p>
<p>The height is obtained from the first item in the view. It is updated when the data changes on that item.</p>
<p><b>Note: </b>If the editor size hint is bigger than the cell size hint, then the size hint of the editor will be used.</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>uniformRowHeights</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUniformRowHeights</b></span>(bool <i>uniform</i>)</td></tr>
</table></div>
<!-- @@@uniformRowHeights -->
<!-- $$$wordWrap-prop$$$wordWrap$$$setWordWrapbool -->
<h3 class="fn" id="wordWrap-prop"><a name="wordWrap-prop"></a><span class="name">wordWrap</span> : <span class="type">bool</span></h3>
<p>This property holds the item text word-wrapping policy</p>
<p>If this property is <code>true</code> then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is <code>false</code> by default.</p>
<p>Note that even if wrapping is enabled, the cell will not be expanded to fit all text. Ellipsis will be inserted according to the current <a href="qabstractitemview.html#textElideMode-prop">textElideMode</a>.</p>
<p>This property was introduced in  Qt 4.3.</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>wordWrap</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setWordWrap</b></span>(bool <i>on</i>)</td></tr>
</table></div>
<!-- @@@wordWrap -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QTreeView[overload1]$$$QTreeViewQWidget* -->
<h3 class="fn" id="QTreeView"><a name="QTreeView"></a>QTreeView::<span class="name">QTreeView</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a tree view with a <i>parent</i> to represent a model's data. Use <a href="qtreeview.html#setModel">setModel</a>() to set the model.</p>
<p><b>See also </b><a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a>.</p>
<!-- @@@QTreeView -->
<!-- $$$~QTreeView[overload1]$$$~QTreeView -->
<h3 class="fn" id="dtor.QTreeView"><a name="dtor.QTreeView"></a>QTreeView::<span class="name">~QTreeView</span>()</h3>
<p>Destroys the tree view.</p>
<!-- @@@~QTreeView -->
<!-- $$$collapse[overload1]$$$collapseconstQModelIndex& -->
<h3 class="fn" id="collapse"><a name="collapse"></a><code>[slot] </code><span class="type">void</span> QTreeView::<span class="name">collapse</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</h3>
<p>Collapses the model item specified by the <i>index</i>.</p>
<p><b>See also </b><a href="qtreeview.html#collapsed">collapsed</a>().</p>
<!-- @@@collapse -->
<!-- $$$collapseAll[overload1]$$$collapseAll -->
<h3 class="fn" id="collapseAll"><a name="collapseAll"></a><code>[slot] </code><span class="type">void</span> QTreeView::<span class="name">collapseAll</span>()</h3>
<p>Collapses all expanded items.</p>
<p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qtreeview.html#expandAll">expandAll</a>(), <a href="qtreeview.html#expand">expand</a>(), <a href="qtreeview.html#collapse">collapse</a>(), and <a href="qtreeview.html#setExpanded">setExpanded</a>().</p>
<!-- @@@collapseAll -->
<!-- $$$collapsed[overload1]$$$collapsedconstQModelIndex& -->
<h3 class="fn" id="collapsed"><a name="collapsed"></a><code>[signal] </code><span class="type">void</span> QTreeView::<span class="name">collapsed</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 collapsed.</p>
<!-- @@@collapsed -->
<!-- $$$columnAt[overload1]$$$columnAtint -->
<h3 class="fn" id="columnAt"><a name="columnAt"></a><span class="type">int</span> QTreeView::<span class="name">columnAt</span>(<span class="type">int</span> <i>x</i>) const</h3>
<p>Returns the column in the tree view whose header covers the <i>x</i> coordinate given.</p>
<!-- @@@columnAt -->
<!-- $$$columnCountChanged[overload1]$$$columnCountChangedintint -->
<h3 class="fn" id="columnCountChanged"><a name="columnCountChanged"></a><code>[protected slot] </code><span class="type">void</span> QTreeView::<span class="name">columnCountChanged</span>(<span class="type">int</span> <i>oldCount</i>, <span class="type">int</span> <i>newCount</i>)</h3>
<p>Informs the tree view that the number of columns in the tree view has changed from <i>oldCount</i> to <i>newCount</i>.</p>
<!-- @@@columnCountChanged -->
<!-- $$$columnMoved[overload1]$$$columnMoved -->
<h3 class="fn" id="columnMoved"><a name="columnMoved"></a><code>[protected slot] </code><span class="type">void</span> QTreeView::<span class="name">columnMoved</span>()</h3>
<p>This slot is called whenever a column has been moved.</p>
<!-- @@@columnMoved -->
<!-- $$$columnResized[overload1]$$$columnResizedintintint -->
<h3 class="fn" id="columnResized"><a name="columnResized"></a><code>[protected slot] </code><span class="type">void</span> QTreeView::<span class="name">columnResized</span>(<span class="type">int</span> <i>column</i>, <span class="type">int</span> <i>oldSize</i>, <span class="type">int</span> <i>newSize</i>)</h3>
<p>This function is called whenever <i>column</i>'s size is changed in the header. <i>oldSize</i> and <i>newSize</i> give the previous size and the new size in pixels.</p>
<p><b>See also </b><a href="qtreeview.html#setColumnWidth">setColumnWidth</a>().</p>
<!-- @@@columnResized -->
<!-- $$$columnViewportPosition[overload1]$$$columnViewportPositionint -->
<h3 class="fn" id="columnViewportPosition"><a name="columnViewportPosition"></a><span class="type">int</span> QTreeView::<span class="name">columnViewportPosition</span>(<span class="type">int</span> <i>column</i>) const</h3>
<p>Returns the horizontal position of the <i>column</i> in the viewport.</p>
<!-- @@@columnViewportPosition -->
<!-- $$$columnWidth[overload1]$$$columnWidthint -->
<h3 class="fn" id="columnWidth"><a name="columnWidth"></a><span class="type">int</span> QTreeView::<span class="name">columnWidth</span>(<span class="type">int</span> <i>column</i>) const</h3>
<p>Returns the width of the <i>column</i>.</p>
<p><b>See also </b><a href="qtreeview.html#resizeColumnToContents">resizeColumnToContents</a>() and <a href="qtreeview.html#setColumnWidth">setColumnWidth</a>().</p>
<!-- @@@columnWidth -->
<!-- $$$currentChanged[overload1]$$$currentChangedconstQModelIndex&constQModelIndex& -->
<h3 class="fn" id="currentChanged"><a name="currentChanged"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>Reimplemented from <a href="qabstractitemview.html#currentChanged">QAbstractItemView::currentChanged</a>().</p>
<!-- @@@currentChanged -->
<!-- $$$dataChanged[overload1]$$$dataChangedconstQModelIndex&constQModelIndex&constQVector<int>& -->
<h3 class="fn" id="dataChanged"><a name="dataChanged"></a><code>[virtual] </code><span class="type">void</span> QTreeView::<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>Reimplemented from <a href="qabstractitemview.html#dataChanged">QAbstractItemView::dataChanged</a>().</p>
<!-- @@@dataChanged -->
<!-- $$$dragMoveEvent[overload1]$$$dragMoveEventQDragMoveEvent* -->
<h3 class="fn" id="dragMoveEvent"><a name="dragMoveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>
<!-- @@@dragMoveEvent -->
<!-- $$$drawBranches[overload1]$$$drawBranchesQPainter*constQRect&constQModelIndex& -->
<h3 class="fn" id="drawBranches"><a name="drawBranches"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<span class="name">drawBranches</span>(<span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>rect</i>, const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Draws the branches in the tree view on the same row as the model item <i>index</i>, using the <i>painter</i> given. The branches are drawn in the rectangle specified by <i>rect</i>.</p>
<!-- @@@drawBranches -->
<!-- $$$drawRow[overload1]$$$drawRowQPainter*constQStyleOptionViewItem&constQModelIndex& -->
<h3 class="fn" id="drawRow"><a name="drawRow"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<span class="name">drawRow</span>(<span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a></span> &amp;<i>option</i>, const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Draws the row in the tree view that contains the model item <i>index</i>, using the <i>painter</i> given. The <i>option</i> controls how the item is displayed.</p>
<p><b>See also </b><a href="qabstractitemview.html#alternatingRowColors-prop">setAlternatingRowColors</a>().</p>
<!-- @@@drawRow -->
<!-- $$$drawTree[overload1]$$$drawTreeQPainter*constQRegion& -->
<h3 class="fn" id="drawTree"><a name="drawTree"></a><code>[protected] </code><span class="type">void</span> QTreeView::<span class="name">drawTree</span>(<span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="../qtgui/qregion.html">QRegion</a></span> &amp;<i>region</i>) const</h3>
<p>Draws the part of the tree intersecting the given <i>region</i> using the specified <i>painter</i>.</p>
<p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qtreeview.html#paintEvent">paintEvent</a>().</p>
<!-- @@@drawTree -->
<!-- $$$expand[overload1]$$$expandconstQModelIndex& -->
<h3 class="fn" id="expand"><a name="expand"></a><code>[slot] </code><span class="type">void</span> QTreeView::<span class="name">expand</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</h3>
<p>Expands the model item specified by the <i>index</i>.</p>
<p><b>See also </b><a href="qtreeview.html#expanded">expanded</a>().</p>
<!-- @@@expand -->
<!-- $$$expandAll[overload1]$$$expandAll -->
<h3 class="fn" id="expandAll"><a name="expandAll"></a><code>[slot] </code><span class="type">void</span> QTreeView::<span class="name">expandAll</span>()</h3>
<p>Expands all expandable items.</p>
<p>Warning: if the model contains a large number of items, this function will take some time to execute.</p>
<p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qtreeview.html#collapseAll">collapseAll</a>(), <a href="qtreeview.html#expand">expand</a>(), <a href="qtreeview.html#collapse">collapse</a>(), and <a href="qtreeview.html#setExpanded">setExpanded</a>().</p>
<!-- @@@expandAll -->
<!-- $$$expandToDepth[overload1]$$$expandToDepthint -->
<h3 class="fn" id="expandToDepth"><a name="expandToDepth"></a><code>[slot] </code><span class="type">void</span> QTreeView::<span class="name">expandToDepth</span>(<span class="type">int</span> <i>depth</i>)</h3>
<p>Expands all expandable items to the given <i>depth</i>.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qtreeview.html#expandAll">expandAll</a>(), <a href="qtreeview.html#collapseAll">collapseAll</a>(), <a href="qtreeview.html#expand">expand</a>(), <a href="qtreeview.html#collapse">collapse</a>(), and <a href="qtreeview.html#setExpanded">setExpanded</a>().</p>
<!-- @@@expandToDepth -->
<!-- $$$expanded[overload1]$$$expandedconstQModelIndex& -->
<h3 class="fn" id="expanded"><a name="expanded"></a><code>[signal] </code><span class="type">void</span> QTreeView::<span class="name">expanded</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 expanded.</p>
<p><b>See also </b><a href="qtreeview.html#setExpanded">setExpanded</a>().</p>
<!-- @@@expanded -->
<!-- $$$header[overload1]$$$header -->
<h3 class="fn" id="header"><a name="header"></a><span class="type"><a href="qheaderview.html">QHeaderView</a></span> *QTreeView::<span class="name">header</span>() const</h3>
<p>Returns the header for the tree view.</p>
<p><b>See also </b><a href="qtreeview.html#setHeader">setHeader</a>() and <a href="../qtcore/qabstractitemmodel.html#headerData">QAbstractItemModel::headerData</a>().</p>
<!-- @@@header -->
<!-- $$$hideColumn[overload1]$$$hideColumnint -->
<h3 class="fn" id="hideColumn"><a name="hideColumn"></a><code>[slot] </code><span class="type">void</span> QTreeView::<span class="name">hideColumn</span>(<span class="type">int</span> <i>column</i>)</h3>
<p>Hides the <i>column</i> given.</p>
<p><b>Note: </b>This function should only be called after the model has been initialized, as the view needs to know the number of columns in order to hide <i>column</i>.</p><p><b>See also </b><a href="qtreeview.html#showColumn">showColumn</a>() and <a href="qtreeview.html#setColumnHidden">setColumnHidden</a>().</p>
<!-- @@@hideColumn -->
<!-- $$$horizontalOffset[overload1]$$$horizontalOffset -->
<h3 class="fn" id="horizontalOffset"><a name="horizontalOffset"></a><code>[virtual protected] </code><span class="type">int</span> QTreeView::<span class="name">horizontalOffset</span>() const</h3>
<p>Reimplemented from <a href="qabstractitemview.html#horizontalOffset">QAbstractItemView::horizontalOffset</a>().</p>
<p>Returns the horizontal offset of the items in the treeview.</p>
<p>Note that the tree view uses the horizontal header section positions to determine the positions of columns in the view.</p>
<p><b>See also </b><a href="qtreeview.html#verticalOffset">verticalOffset</a>().</p>
<!-- @@@horizontalOffset -->
<!-- $$$indexAbove[overload1]$$$indexAboveconstQModelIndex& -->
<h3 class="fn" id="indexAbove"><a name="indexAbove"></a><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QTreeView::<span class="name">indexAbove</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Returns the model index of the item above <i>index</i>.</p>
<!-- @@@indexAbove -->
<!-- $$$indexAt[overload1]$$$indexAtconstQPoint& -->
<h3 class="fn" id="indexAt"><a name="indexAt"></a><code>[virtual] </code><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QTreeView::<span class="name">indexAt</span>(const <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> &amp;<i>point</i>) const</h3>
<p>Reimplemented from <a href="qabstractitemview.html#indexAt">QAbstractItemView::indexAt</a>().</p>
<!-- @@@indexAt -->
<!-- $$$indexBelow[overload1]$$$indexBelowconstQModelIndex& -->
<h3 class="fn" id="indexBelow"><a name="indexBelow"></a><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QTreeView::<span class="name">indexBelow</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Returns the model index of the item below <i>index</i>.</p>
<!-- @@@indexBelow -->
<!-- $$$indexRowSizeHint[overload1]$$$indexRowSizeHintconstQModelIndex& -->
<h3 class="fn" id="indexRowSizeHint"><a name="indexRowSizeHint"></a><code>[protected] </code><span class="type">int</span> QTreeView::<span class="name">indexRowSizeHint</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 row indicated by <i>index</i>.</p>
<p><b>See also </b><a href="qtreeview.html#sizeHintForColumn">sizeHintForColumn</a>() and <a href="qtreeview.html#uniformRowHeights-prop">uniformRowHeights</a>().</p>
<!-- @@@indexRowSizeHint -->
<!-- $$$isColumnHidden[overload1]$$$isColumnHiddenint -->
<h3 class="fn" id="isColumnHidden"><a name="isColumnHidden"></a><span class="type">bool</span> QTreeView::<span class="name">isColumnHidden</span>(<span class="type">int</span> <i>column</i>) const</h3>
<p>Returns <code>true</code> if the <i>column</i> is hidden; otherwise returns <code>false</code>.</p>
<p><b>See also </b><a href="qtreeview.html#hideColumn">hideColumn</a>() and <a href="qtreeview.html#isRowHidden">isRowHidden</a>().</p>
<!-- @@@isColumnHidden -->
<!-- $$$isExpanded[overload1]$$$isExpandedconstQModelIndex& -->
<h3 class="fn" id="isExpanded"><a name="isExpanded"></a><span class="type">bool</span> QTreeView::<span class="name">isExpanded</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 model item <i>index</i> is expanded; otherwise returns false.</p>
<p><b>See also </b><a href="qtreeview.html#expand">expand</a>(), <a href="qtreeview.html#expanded">expanded</a>(), and <a href="qtreeview.html#setExpanded">setExpanded</a>().</p>
<!-- @@@isExpanded -->
<!-- $$$isFirstColumnSpanned[overload1]$$$isFirstColumnSpannedintconstQModelIndex& -->
<h3 class="fn" id="isFirstColumnSpanned"><a name="isFirstColumnSpanned"></a><span class="type">bool</span> QTreeView::<span class="name">isFirstColumnSpanned</span>(<span class="type">int</span> <i>row</i>, const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i>) const</h3>
<p>Returns <code>true</code> if the item in first column in the given <i>row</i> of the <i>parent</i> is spanning all the columns; otherwise returns <code>false</code>.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qtreeview.html#setFirstColumnSpanned">setFirstColumnSpanned</a>().</p>
<!-- @@@isFirstColumnSpanned -->
<!-- $$$isIndexHidden[overload1]$$$isIndexHiddenconstQModelIndex& -->
<h3 class="fn" id="isIndexHidden"><a name="isIndexHidden"></a><code>[virtual protected] </code><span class="type">bool</span> QTreeView::<span class="name">isIndexHidden</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Reimplemented from <a href="qabstractitemview.html#isIndexHidden">QAbstractItemView::isIndexHidden</a>().</p>
<!-- @@@isIndexHidden -->
<!-- $$$isRowHidden[overload1]$$$isRowHiddenintconstQModelIndex& -->
<h3 class="fn" id="isRowHidden"><a name="isRowHidden"></a><span class="type">bool</span> QTreeView::<span class="name">isRowHidden</span>(<span class="type">int</span> <i>row</i>, const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i>) const</h3>
<p>Returns <code>true</code> if the item in the given <i>row</i> of the <i>parent</i> is hidden; otherwise returns <code>false</code>.</p>
<p><b>See also </b><a href="qtreeview.html#setRowHidden">setRowHidden</a>() and <a href="qtreeview.html#isColumnHidden">isColumnHidden</a>().</p>
<!-- @@@isRowHidden -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn" id="keyPressEvent"><a name="keyPressEvent"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>
<!-- @@@keyPressEvent -->
<!-- $$$keyboardSearch[overload1]$$$keyboardSearchconstQString& -->
<h3 class="fn" id="keyboardSearch"><a name="keyboardSearch"></a><code>[virtual] </code><span class="type">void</span> QTreeView::<span class="name">keyboardSearch</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>search</i>)</h3>
<p>Reimplemented from <a href="qabstractitemview.html#keyboardSearch">QAbstractItemView::keyboardSearch</a>().</p>
<!-- @@@keyboardSearch -->
<!-- $$$mouseDoubleClickEvent[overload1]$$$mouseDoubleClickEventQMouseEvent* -->
<h3 class="fn" id="mouseDoubleClickEvent"><a name="mouseDoubleClickEvent"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>
<!-- @@@mouseDoubleClickEvent -->
<!-- $$$mouseMoveEvent[overload1]$$$mouseMoveEventQMouseEvent* -->
<h3 class="fn" id="mouseMoveEvent"><a name="mouseMoveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>
<!-- @@@mouseMoveEvent -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn" id="mousePressEvent"><a name="mousePressEvent"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>
<!-- @@@mousePressEvent -->
<!-- $$$mouseReleaseEvent[overload1]$$$mouseReleaseEventQMouseEvent* -->
<h3 class="fn" id="mouseReleaseEvent"><a name="mouseReleaseEvent"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>
<!-- @@@mouseReleaseEvent -->
<!-- $$$moveCursor[overload1]$$$moveCursorCursorActionQt::KeyboardModifiers -->
<h3 class="fn" id="moveCursor"><a name="moveCursor"></a><code>[virtual protected] </code><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QTreeView::<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>Reimplemented from <a href="qabstractitemview.html#moveCursor">QAbstractItemView::moveCursor</a>().</p>
<p>Move the cursor in the way described by <i>cursorAction</i>, using the information provided by the button <i>modifiers</i>.</p>
<!-- @@@moveCursor -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn" id="paintEvent"><a name="paintEvent"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<span class="name">paintEvent</span>(<span class="type"><a href="../qtgui/qpaintevent.html">QPaintEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<!-- @@@paintEvent -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn" id="reset"><a name="reset"></a><code>[virtual] </code><span class="type">void</span> QTreeView::<span class="name">reset</span>()</h3>
<p>Reimplemented from <a href="qabstractitemview.html#reset">QAbstractItemView::reset</a>().</p>
<!-- @@@reset -->
<!-- $$$resizeColumnToContents[overload1]$$$resizeColumnToContentsint -->
<h3 class="fn" id="resizeColumnToContents"><a name="resizeColumnToContents"></a><code>[slot] </code><span class="type">void</span> QTreeView::<span class="name">resizeColumnToContents</span>(<span class="type">int</span> <i>column</i>)</h3>
<p>Resizes the <i>column</i> given to the size of its contents.</p>
<p><b>See also </b><a href="qtreeview.html#columnWidth">columnWidth</a>(), <a href="qtreeview.html#setColumnWidth">setColumnWidth</a>(), <a href="qtreeview.html#sizeHintForColumn">sizeHintForColumn</a>(), and <a href="qheaderview.html#resizeContentsPrecision">QHeaderView::resizeContentsPrecision</a>().</p>
<!-- @@@resizeColumnToContents -->
<!-- $$$rowHeight[overload1]$$$rowHeightconstQModelIndex& -->
<h3 class="fn" id="rowHeight"><a name="rowHeight"></a><code>[protected] </code><span class="type">int</span> QTreeView::<span class="name">rowHeight</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Returns the height of the row indicated by the given <i>index</i>.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qtreeview.html#indexRowSizeHint">indexRowSizeHint</a>().</p>
<!-- @@@rowHeight -->
<!-- $$$rowsAboutToBeRemoved[overload1]$$$rowsAboutToBeRemovedconstQModelIndex&intint -->
<h3 class="fn" id="rowsAboutToBeRemoved"><a name="rowsAboutToBeRemoved"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>Reimplemented from <a href="qabstractitemview.html#rowsAboutToBeRemoved">QAbstractItemView::rowsAboutToBeRemoved</a>().</p>
<p>Informs the view that the rows from the <i>start</i> row to the <i>end</i> row inclusive are about to removed from the given <i>parent</i> model item.</p>
<!-- @@@rowsAboutToBeRemoved -->
<!-- $$$rowsInserted[overload1]$$$rowsInsertedconstQModelIndex&intint -->
<h3 class="fn" id="rowsInserted"><a name="rowsInserted"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>Reimplemented from <a href="qabstractitemview.html#rowsInserted">QAbstractItemView::rowsInserted</a>().</p>
<p>Informs the view that the rows from the <i>start</i> row to the <i>end</i> row inclusive have been inserted into the <i>parent</i> model item.</p>
<!-- @@@rowsInserted -->
<!-- $$$rowsRemoved[overload1]$$$rowsRemovedconstQModelIndex&intint -->
<h3 class="fn" id="rowsRemoved"><a name="rowsRemoved"></a><code>[protected slot] </code><span class="type">void</span> QTreeView::<span class="name">rowsRemoved</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>Informs the view that the rows from the <i>start</i> row to the <i>end</i> row inclusive have been removed from the given <i>parent</i> model item.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@rowsRemoved -->
<!-- $$$scrollContentsBy[overload1]$$$scrollContentsByintint -->
<h3 class="fn" id="scrollContentsBy"><a name="scrollContentsBy"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<span class="name">scrollContentsBy</span>(<span class="type">int</span> <i>dx</i>, <span class="type">int</span> <i>dy</i>)</h3>
<p>Reimplemented from <a href="qabstractscrollarea.html#scrollContentsBy">QAbstractScrollArea::scrollContentsBy</a>().</p>
<p>Scrolls the contents of the tree view by (<i>dx</i>, <i>dy</i>).</p>
<!-- @@@scrollContentsBy -->
<!-- $$$scrollTo[overload1]$$$scrollToconstQModelIndex&ScrollHint -->
<h3 class="fn" id="scrollTo"><a name="scrollTo"></a><code>[virtual] </code><span class="type">void</span> QTreeView::<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>Reimplemented from <a href="qabstractitemview.html#scrollTo">QAbstractItemView::scrollTo</a>().</p>
<p>Scroll the contents of the tree view until the given model item <i>index</i> is visible. The <i>hint</i> parameter specifies more precisely where the item should be located after the operation. If any of the parents of the model item are collapsed, they will be expanded to ensure that the model item is visible.</p>
<!-- @@@scrollTo -->
<!-- $$$selectAll[overload1]$$$selectAll -->
<h3 class="fn" id="selectAll"><a name="selectAll"></a><code>[virtual] </code><span class="type">void</span> QTreeView::<span class="name">selectAll</span>()</h3>
<p>Reimplemented from <a href="qabstractitemview.html#selectAll">QAbstractItemView::selectAll</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> QTreeView::<span class="name">selectedIndexes</span>() const</h3>
<p>Reimplemented from <a href="qabstractitemview.html#selectedIndexes">QAbstractItemView::selectedIndexes</a>().</p>
<!-- @@@selectedIndexes -->
<!-- $$$selectionChanged[overload1]$$$selectionChangedconstQItemSelection&constQItemSelection& -->
<h3 class="fn" id="selectionChanged"><a name="selectionChanged"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>Reimplemented from <a href="qabstractitemview.html#selectionChanged">QAbstractItemView::selectionChanged</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$setColumnHidden[overload1]$$$setColumnHiddenintbool -->
<h3 class="fn" id="setColumnHidden"><a name="setColumnHidden"></a><span class="type">void</span> QTreeView::<span class="name">setColumnHidden</span>(<span class="type">int</span> <i>column</i>, <span class="type">bool</span> <i>hide</i>)</h3>
<p>If <i>hide</i> is true the <i>column</i> is hidden, otherwise the <i>column</i> is shown.</p>
<p><b>See also </b><a href="qtreeview.html#isColumnHidden">isColumnHidden</a>(), <a href="qtreeview.html#hideColumn">hideColumn</a>(), and <a href="qtreeview.html#setRowHidden">setRowHidden</a>().</p>
<!-- @@@setColumnHidden -->
<!-- $$$setColumnWidth[overload1]$$$setColumnWidthintint -->
<h3 class="fn" id="setColumnWidth"><a name="setColumnWidth"></a><span class="type">void</span> QTreeView::<span class="name">setColumnWidth</span>(<span class="type">int</span> <i>column</i>, <span class="type">int</span> <i>width</i>)</h3>
<p>Sets the width of the given <i>column</i> to the <i>width</i> specified.</p>
<p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qtreeview.html#columnWidth">columnWidth</a>() and <a href="qtreeview.html#resizeColumnToContents">resizeColumnToContents</a>().</p>
<!-- @@@setColumnWidth -->
<!-- $$$setExpanded[overload1]$$$setExpandedconstQModelIndex&bool -->
<h3 class="fn" id="setExpanded"><a name="setExpanded"></a><span class="type">void</span> QTreeView::<span class="name">setExpanded</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>, <span class="type">bool</span> <i>expanded</i>)</h3>
<p>Sets the item referred to by <i>index</i> to either collapse or expanded, depending on the value of <i>expanded</i>.</p>
<p><b>See also </b><a href="qtreeview.html#expanded">expanded</a>(), <a href="qtreeview.html#expand">expand</a>(), and <a href="qtreeview.html#isExpanded">isExpanded</a>().</p>
<!-- @@@setExpanded -->
<!-- $$$setFirstColumnSpanned[overload1]$$$setFirstColumnSpannedintconstQModelIndex&bool -->
<h3 class="fn" id="setFirstColumnSpanned"><a name="setFirstColumnSpanned"></a><span class="type">void</span> QTreeView::<span class="name">setFirstColumnSpanned</span>(<span class="type">int</span> <i>row</i>, const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i>, <span class="type">bool</span> <i>span</i>)</h3>
<p>If <i>span</i> is true the item in the first column in the <i>row</i> with the given <i>parent</i> is set to span all columns, otherwise all items on the <i>row</i> are shown.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qtreeview.html#isFirstColumnSpanned">isFirstColumnSpanned</a>().</p>
<!-- @@@setFirstColumnSpanned -->
<!-- $$$setHeader[overload1]$$$setHeaderQHeaderView* -->
<h3 class="fn" id="setHeader"><a name="setHeader"></a><span class="type">void</span> QTreeView::<span class="name">setHeader</span>(<span class="type"><a href="qheaderview.html">QHeaderView</a></span> *<i>header</i>)</h3>
<p>Sets the header for the tree view, to the given <i>header</i>.</p>
<p>The view takes ownership over the given <i>header</i> and deletes it when a new header is set.</p>
<p><b>See also </b><a href="../qtcore/qabstractitemmodel.html#headerData">QAbstractItemModel::headerData</a>().</p>
<!-- @@@setHeader -->
<!-- $$$setModel[overload1]$$$setModelQAbstractItemModel* -->
<h3 class="fn" id="setModel"><a name="setModel"></a><code>[virtual] </code><span class="type">void</span> QTreeView::<span class="name">setModel</span>(<span class="type"><a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a></span> *<i>model</i>)</h3>
<p>Reimplemented from <a href="qabstractitemview.html#setModel">QAbstractItemView::setModel</a>().</p>
<!-- @@@setModel -->
<!-- $$$setRootIndex[overload1]$$$setRootIndexconstQModelIndex& -->
<h3 class="fn" id="setRootIndex"><a name="setRootIndex"></a><code>[virtual] </code><span class="type">void</span> QTreeView::<span class="name">setRootIndex</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</h3>
<p>Reimplemented from <a href="qabstractitemview.html#setRootIndex">QAbstractItemView::setRootIndex</a>().</p>
<!-- @@@setRootIndex -->
<!-- $$$setRowHidden[overload1]$$$setRowHiddenintconstQModelIndex&bool -->
<h3 class="fn" id="setRowHidden"><a name="setRowHidden"></a><span class="type">void</span> QTreeView::<span class="name">setRowHidden</span>(<span class="type">int</span> <i>row</i>, const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i>, <span class="type">bool</span> <i>hide</i>)</h3>
<p>If <i>hide</i> is true the <i>row</i> with the given <i>parent</i> is hidden, otherwise the <i>row</i> is shown.</p>
<p><b>See also </b><a href="qtreeview.html#isRowHidden">isRowHidden</a>() and <a href="qtreeview.html#setColumnHidden">setColumnHidden</a>().</p>
<!-- @@@setRowHidden -->
<!-- $$$setSelection[overload1]$$$setSelectionconstQRect&QItemSelectionModel::SelectionFlags -->
<h3 class="fn" id="setSelection"><a name="setSelection"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>command</i>)</h3>
<p>Reimplemented from <a href="qabstractitemview.html#setSelection">QAbstractItemView::setSelection</a>().</p>
<p>Applies the selection <i>command</i> to the items in or touched by the rectangle, <i>rect</i>.</p>
<p><b>See also </b><a href="qabstractitemview.html#selectionCommand">selectionCommand</a>().</p>
<!-- @@@setSelection -->
<!-- $$$setSelectionModel[overload1]$$$setSelectionModelQItemSelectionModel* -->
<h3 class="fn" id="setSelectionModel"><a name="setSelectionModel"></a><code>[virtual] </code><span class="type">void</span> QTreeView::<span class="name">setSelectionModel</span>(<span class="type"><a href="../qtcore/qitemselectionmodel.html">QItemSelectionModel</a></span> *<i>selectionModel</i>)</h3>
<p>Reimplemented from <a href="qabstractitemview.html#setSelectionModel">QAbstractItemView::setSelectionModel</a>().</p>
<!-- @@@setSelectionModel -->
<!-- $$$setTreePosition[overload1]$$$setTreePositionint -->
<h3 class="fn" id="setTreePosition"><a name="setTreePosition"></a><span class="type">void</span> QTreeView::<span class="name">setTreePosition</span>(<span class="type">int</span> <i>index</i>)</h3>
<p>This specifies that the tree structure should be placed at logical index <i>index</i>. If <!--is--> set to -1 then the tree will always follow visual index 0.</p>
<p>This function was introduced in  Qt 5.2.</p>
<p><b>See also </b><a href="qtreeview.html#treePosition">treePosition</a>(), <a href="qheaderview.html#swapSections">QHeaderView::swapSections</a>(), and <a href="qheaderview.html#moveSection">QHeaderView::moveSection</a>().</p>
<!-- @@@setTreePosition -->
<!-- $$$showColumn[overload1]$$$showColumnint -->
<h3 class="fn" id="showColumn"><a name="showColumn"></a><code>[slot] </code><span class="type">void</span> QTreeView::<span class="name">showColumn</span>(<span class="type">int</span> <i>column</i>)</h3>
<p>Shows the given <i>column</i> in the tree view.</p>
<p><b>See also </b><a href="qtreeview.html#hideColumn">hideColumn</a>() and <a href="qtreeview.html#setColumnHidden">setColumnHidden</a>().</p>
<!-- @@@showColumn -->
<!-- $$$sizeHintForColumn[overload1]$$$sizeHintForColumnint -->
<h3 class="fn" id="sizeHintForColumn"><a name="sizeHintForColumn"></a><code>[virtual protected] </code><span class="type">int</span> QTreeView::<span class="name">sizeHintForColumn</span>(<span class="type">int</span> <i>column</i>) const</h3>
<p>Reimplemented from <a href="qabstractitemview.html#sizeHintForColumn">QAbstractItemView::sizeHintForColumn</a>().</p>
<p>Returns the size hint for the <i>column</i>'s width or -1 if there is no model.</p>
<p>If you need to set the width of a given column to a fixed value, call <a href="qheaderview.html#resizeSection">QHeaderView::resizeSection</a>() on the view's header.</p>
<p>If you reimplement this function in a subclass, note that the value you return is only used when <a href="qtreeview.html#resizeColumnToContents">resizeColumnToContents</a>() is called. In that case, if a larger column width is required by either the view's header or the item delegate, that width will be used instead.</p>
<p><b>See also </b><a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>, <a href="qtreeview.html#header">header</a>(), and <a href="qheaderview.html#resizeContentsPrecision">QHeaderView::resizeContentsPrecision</a>().</p>
<!-- @@@sizeHintForColumn -->
<!-- $$$sortByColumn[overload1]$$$sortByColumnintQt::SortOrder -->
<h3 class="fn" id="sortByColumn"><a name="sortByColumn"></a><span class="type">void</span> QTreeView::<span class="name">sortByColumn</span>(<span class="type">int</span> <i>column</i>, <span class="type"><a href="../qtcore/qt.html#SortOrder-enum">Qt::SortOrder</a></span> <i>order</i>)</h3>
<p>Sets the model up for sorting by the values in the given <i>column</i> and <i>order</i>.</p>
<p><i>column</i> may be -1, in which case no sort indicator will be shown and the model will return to its natural, unsorted order. Note that not all models support this and may even crash in this case.</p>
<p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qtreeview.html#sortingEnabled-prop">sortingEnabled</a>.</p>
<!-- @@@sortByColumn -->
<!-- $$$timerEvent[overload1]$$$timerEventQTimerEvent* -->
<h3 class="fn" id="timerEvent"><a name="timerEvent"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<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>
<!-- @@@timerEvent -->
<!-- $$$treePosition[overload1]$$$treePosition -->
<h3 class="fn" id="treePosition"><a name="treePosition"></a><span class="type">int</span> QTreeView::<span class="name">treePosition</span>() const</h3>
<p>Return the logical index the tree is set on. If the return value is -1 then the tree is placed on the visual index 0.</p>
<p>This function was introduced in  Qt 5.2.</p>
<p><b>See also </b><a href="qtreeview.html#setTreePosition">setTreePosition</a>().</p>
<!-- @@@treePosition -->
<!-- $$$updateGeometries[overload1]$$$updateGeometries -->
<h3 class="fn" id="updateGeometries"><a name="updateGeometries"></a><code>[virtual protected] </code><span class="type">void</span> QTreeView::<span class="name">updateGeometries</span>()</h3>
<p>Reimplemented from <a href="qabstractitemview.html#updateGeometries">QAbstractItemView::updateGeometries</a>().</p>
<!-- @@@updateGeometries -->
<!-- $$$verticalOffset[overload1]$$$verticalOffset -->
<h3 class="fn" id="verticalOffset"><a name="verticalOffset"></a><code>[virtual protected] </code><span class="type">int</span> QTreeView::<span class="name">verticalOffset</span>() const</h3>
<p>Reimplemented from <a href="qabstractitemview.html#verticalOffset">QAbstractItemView::verticalOffset</a>().</p>
<p>Returns the vertical offset of the items in the tree view.</p>
<p><b>See also </b><a href="qtreeview.html#horizontalOffset">horizontalOffset</a>().</p>
<!-- @@@verticalOffset -->
<!-- $$$viewportEvent[overload1]$$$viewportEventQEvent* -->
<h3 class="fn" id="viewportEvent"><a name="viewportEvent"></a><code>[virtual protected] </code><span class="type">bool</span> QTreeView::<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>
<!-- @@@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> QTreeView::<span class="name">viewportSizeHint</span>() const</h3>
<p>Reimplemented from <a href="qabstractscrollarea.html#viewportSizeHint">QAbstractScrollArea::viewportSizeHint</a>().</p>
<!-- @@@viewportSizeHint -->
<!-- $$$visualRect[overload1]$$$visualRectconstQModelIndex& -->
<h3 class="fn" id="visualRect"><a name="visualRect"></a><code>[virtual] </code><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QTreeView::<span class="name">visualRect</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Reimplemented from <a href="qabstractitemview.html#visualRect">QAbstractItemView::visualRect</a>().</p>
<p>Returns the rectangle on the viewport occupied by the item at <i>index</i>. If the index is not visible or explicitly hidden, the returned rectangle is invalid.</p>
<!-- @@@visualRect -->
<!-- $$$visualRegionForSelection[overload1]$$$visualRegionForSelectionconstQItemSelection& -->
<h3 class="fn" id="visualRegionForSelection"><a name="visualRegionForSelection"></a><code>[virtual protected] </code><span class="type"><a href="../qtgui/qregion.html">QRegion</a></span> QTreeView::<span class="name">visualRegionForSelection</span>(const <span class="type"><a href="../qtcore/qitemselection.html">QItemSelection</a></span> &amp;<i>selection</i>) const</h3>
<p>Reimplemented from <a href="qabstractitemview.html#visualRegionForSelection">QAbstractItemView::visualRegionForSelection</a>().</p>
<p>Returns the rectangle from the viewport of the items in the given <i>selection</i>.</p>
<p>Since 4.7, the returned region only contains rectangles intersecting (or included in) the viewport.</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>