Ejemplo n.º 1
0
 def recurse(parent_item: QTreeWidgetItem):
     for i in range(parent_item.childCount()):
         child = parent_item.child(i)
         if int(child.flags()) & int(Qt.ItemIsUserCheckable) and \
                 child.checkState(0) == Qt.Checked:
             checked_items.append(child)
         grand_children = child.childCount()
         if grand_children > 0:
             recurse(child)
Ejemplo n.º 2
0
 def recurse(parent_item: QTreeWidgetItem):
     for i in range(parent_item.childCount()):
         child = parent_item.child(i)
         grand_children = child.childCount()
         if grand_children > 0:
             recurse(child)
         else:
             if child.checkState(0) == Qt.Checked:
                 checked_items.append(child)
Ejemplo n.º 3
0
 def recurse(parent_item: QTreeWidgetItem):
     for i in range(parent_item.childCount()):
         child = parent_item.child(i)
         grand_children = child.childCount()
         if grand_children > 0:
             recurse(child)
         else:
             if child.checkState(0) == Qt.Checked:
                 child.setCheckState(0, Qt.CheckState.Unchecked)
                 child.setSelected(False)