diff options
Diffstat (limited to 'src/widgets/itemviews/qtreeview_p.h')
-rw-r--r-- | src/widgets/itemviews/qtreeview_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h index 5a0821c9cf..a687d4665d 100644 --- a/src/widgets/itemviews/qtreeview_p.h +++ b/src/widgets/itemviews/qtreeview_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtWidgets module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -203,7 +203,7 @@ public: inline bool isIndexExpanded(const QModelIndex &idx) const { //We first check if the idx is a QPersistentModelIndex, because creating QPersistentModelIndex is slow - return isPersistent(idx) && expandedIndexes.contains(idx); + return !(idx.flags() & Qt::ItemNeverHasChildren) && isPersistent(idx) && expandedIndexes.contains(idx); } // used when hiding and showing items |