class_docstr: Extends QTreeWidget to allow internal drag/drop with widgets in the tree.
  Also maintains the expanded state of subtrees as they are moved.
  This class demonstrates the absurd lengths one must go to to make drag/drop work.
class_docstr_tok: ["Extends","QTreeWidget","to","allow","internal","drag\/drop","with","widgets","in","the","tree",".","Also","maintains","the","expanded","state","of","subtrees","as","they","are","moved",".","This","class","demonstrates","the","absurd","lengths","one","must","go","to","to","make","drag\/drop","work","."]
code: def listAllItems(self, item=None):
      items = []
      if item is not None:
          items.append(item)
      else:
          item = self.invisibleRootItem()
  
      for cindex in range(item.childCount()):
          foundItems = self.listAllItems(item=item.child(cindex))
          for f in foundItems:
              items.append(f)
      return items
  
imports: from ..Qt import QtCore, QtWidgets
label_desc: Use image node_id 10 for calling the TreeWidget obj's underlying member method code with example usage: obj.listAllItems(item) and returns: items