,QTreeview只能展开一个同级节点
在线等,QTreeview只能展开一个同级节点
现在已使用两个信号
void collapsed ( const QModelIndex & index )
void expanded ( const QModelIndex & index )
做其他操作。
如何让“QTreeview只能展开一个同级节点”
------解决方案--------------------
收到 expanded(index) 的时候,
取index的parent,检查parent的子节点(除index)是否已经被关闭。
现在已使用两个信号
void collapsed ( const QModelIndex & index )
void expanded ( const QModelIndex & index )
做其他操作。
如何让“QTreeview只能展开一个同级节点”
------解决方案--------------------
收到 expanded(index) 的时候,
取index的parent,检查parent的子节点(除index)是否已经被关闭。