Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.1
-
None
-
80fa4b6c8ef4d4b51c6a8c114aed2f7b1bc4db45 3260aec38ebfdd9f5bc0ce8e5b8e239f30a59c1b 08a632ac1ac48eebdb60d9b87b221e7dbd3c22c4 6a5c6b3ce60f8714824f3ce0224885cb694c1aa4
Description
qt/src/gui/itemviews/qtreeview.cpp looks like;
void QTreeView::expandAll() { Q_D(QTreeView); d->viewItems.clear(); d->expandedIndexes.clear(); d->interruptDelayedItemsLayout(); d->layout(-1); for (int i = 0; i < d->viewItems.count(); ++i) { if (d->viewItems[i].expanded) continue; d->viewItems[i].expanded = true; d->layout(i); QModelIndex idx = d->viewItems.at(i).index; d->expandedIndexes.insert(idx); } updateGeometries(); d->viewport->update(); }
what is missing is a
d->expandedIndexes.insert(idx); + emit expanded(idx);
the same is true for the QTreeView::collapseAll() method which does miss a "emit collapsed(idx);" too.
This is important cause it's the only way to be informed if the collapsed/expanded state of an item changes and to react to that change.