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 prepareMove(self, item):
      item.__widgets = []
      item.__expanded = item.isExpanded()
      for i in range(self.columnCount()):
          w = self.itemWidget(item, i)
          item.__widgets.append(w)
          if w is None:
              continue
          w.setParent(None)
      for i in range(item.childCount()):
          self.prepareMove(item.child(i))
  
imports: from ..Qt import QtCore, QtWidgets
label_desc: Use image node_id 6 for calling the TreeWidget obj's underlying member method code with example usage: obj.prepareMove(item) without return types