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