diff options
author | Andy Shaw <andy.shaw@qt.io> | 2018-05-30 22:00:08 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2018-06-15 09:19:23 +0000 |
commit | d760f39d5c7ec3a74f463abff5224fe741a1b19c (patch) | |
tree | 1fb47f216eb15f0aca21be0ca6b6a8415ee8b0ba /src/widgets/itemviews/qtreewidget_p.h | |
parent | fc6ae3957ec2cded150a5519738bb98d08f57241 (diff) | |
download | qtbase-d760f39d5c7ec3a74f463abff5224fe741a1b19c.tar.gz |
QTreeWidget: Keep items hidden even if their parents are reparented
When an item is explicitly hidden, then it should stay that way even if
its parent is reparented. The item itself needs to be explicitly shown
for it to be made visible.
Task-number: QTBUG-54843
Change-Id: I0c6eea9a936f82d5874e3246292bd16365440411
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qtreewidget_p.h')
-rw-r--r-- | src/widgets/itemviews/qtreewidget_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qtreewidget_p.h b/src/widgets/itemviews/qtreewidget_p.h index 7bc8af8fbd..adc2c2c421 100644 --- a/src/widgets/itemviews/qtreewidget_p.h +++ b/src/widgets/itemviews/qtreewidget_p.h @@ -187,13 +187,16 @@ class QTreeWidgetItemPrivate { public: QTreeWidgetItemPrivate(QTreeWidgetItem *item) - : q(item), disabled(false), selected(false), rowGuess(-1), policy(QTreeWidgetItem::DontShowIndicatorWhenChildless) {} + : q(item), disabled(false), selected(false), hidden(false), rowGuess(-1), + policy(QTreeWidgetItem::DontShowIndicatorWhenChildless) {} void propagateDisabled(QTreeWidgetItem *item); + void updateHiddenStatus(QTreeWidgetItem *item, bool inserting); void sortChildren(int column, Qt::SortOrder order, bool climb); QTreeWidgetItem *q; QVariantList display; uint disabled : 1; uint selected : 1; + uint hidden : 1; int rowGuess; QTreeWidgetItem::ChildIndicatorPolicy policy; }; |