当前位置: 代码迷 >> QT开发 >> 关于QTreeView节点展开的有关问题
  详细解决方案

关于QTreeView节点展开的有关问题

热度:56   发布时间:2016-04-25 03:39:10.0
关于QTreeView节点展开的问题
QTreeView里的QStandardItemModel添加了QStandardItem,QStandardItem下面有子QStandardItem,如果添加后让QTreeView自动展开该节点呢?

------解决方案--------------------
void QTreeView::expandAll () [slot]
Expands all expandable items.
Warning: if the model contains a large number of items, this function will take some time to execute.
This function was introduced in Qt 4.2.