diff options
Diffstat (limited to 'src/widgets/itemviews/qtreeview.cpp')
-rw-r--r-- | src/widgets/itemviews/qtreeview.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 69ab0bb958..6ab6576cbe 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -1948,7 +1948,7 @@ void QTreeView::mouseDoubleClickEvent(QMouseEvent *event) if (!style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, nullptr, this)) emit activated(persistent); - d->pressedIndex = QModelIndex(); + d->releaseFromDoubleClick = true; d->executePostedLayout(); // we need to make sure viewItems is updated if (d->itemsExpandable && d->expandsOnDoubleClick @@ -2665,7 +2665,10 @@ QSize QTreeView::viewportSizeHint() const \since 4.2 Expands all expandable items. - \warning: if the model contains a large number of items, + \note This function will not try to \l{QAbstractItemModel::fetchMore}{fetch more} + data. + + \warning If the model contains a large number of items, this function will take some time to execute. \sa collapseAll(), expand(), collapse(), setExpanded() @@ -2687,7 +2690,10 @@ void QTreeView::expandAll() A \a depth of -1 will expand all children, a \a depth of 0 will only expand the given \a index. - \warning: if the model contains a large number of items, + \note This function will not try to \l{QAbstractItemModel::fetchMore}{fetch more} + data. + + \warning If the model contains a large number of items, this function will take some time to execute. \sa expandAll() @@ -2752,6 +2758,9 @@ void QTreeView::collapseAll() \since 4.3 Expands all expandable items to the given \a depth. + \note This function will not try to \l{QAbstractItemModel::fetchMore}{fetch more} + data. + \sa expandAll(), collapseAll(), expand(), collapse(), setExpanded() */ void QTreeView::expandToDepth(int depth) |