summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qtreewidget.h
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-05-30 22:00:08 +0200
committerAndy Shaw <andy.shaw@qt.io>2018-06-15 09:19:23 +0000
commitd760f39d5c7ec3a74f463abff5224fe741a1b19c (patch)
tree1fb47f216eb15f0aca21be0ca6b6a8415ee8b0ba /src/widgets/itemviews/qtreewidget.h
parentfc6ae3957ec2cded150a5519738bb98d08f57241 (diff)
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.h')
-rw-r--r--src/widgets/itemviews/qtreewidget.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/widgets/itemviews/qtreewidget.h b/src/widgets/itemviews/qtreewidget.h
index 24919c411d..975f208702 100644
--- a/src/widgets/itemviews/qtreewidget.h
+++ b/src/widgets/itemviews/qtreewidget.h
@@ -82,8 +82,8 @@ public:
inline void setSelected(bool select);
inline bool isSelected() const;
- inline void setHidden(bool hide);
- inline bool isHidden() const;
+ void setHidden(bool hide);
+ bool isHidden() const;
inline void setExpanded(bool expand);
inline bool isExpanded() const;
@@ -410,12 +410,6 @@ inline void QTreeWidgetItem::setSelected(bool aselect)
inline bool QTreeWidgetItem::isSelected() const
{ return (view ? view->isItemSelected(this) : false); }
-inline void QTreeWidgetItem::setHidden(bool ahide)
-{ if (view) view->setItemHidden(this, ahide); }
-
-inline bool QTreeWidgetItem::isHidden() const
-{ return (view ? view->isItemHidden(this) : false); }
-
inline void QTreeWidgetItem::setExpanded(bool aexpand)
{ if (view) view->setItemExpanded(this, aexpand); }