Exemplo n.º 1
0
 def expand(node: QTreeWidgetItem, level: int):
     not_target = level != target_level
     node.setExpanded(not_target)
     if not_target:
         for i in range(node.childCount()):
             expand(node.child(i), level + 1)
Exemplo n.º 2
0
def _expand_recursive(node: QTreeWidgetItem):
    """Expand node and its children."""
    node.setExpanded(True)
    for i in range(node.childCount()):
        _expand_recursive(node.child(i))