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 __init__(self, parent=None):
      QtWidgets.QTreeWidget.__init__(self, parent)
  
      # wrap this item so that we can propagate tree change information
      # to children.
      self._invRootItem = InvisibleRootItem(
          QtWidgets.QTreeWidget.invisibleRootItem(self)
      )
  
      self.setAcceptDrops(True)
      self.setDragEnabled(True)
      self.setEditTriggers(
          QtWidgets.QAbstractItemView.EditTrigger.EditKeyPressed
          | QtWidgets.QAbstractItemView.EditTrigger.SelectedClicked
      )
      self.placeholders = []
      self.childNestingLimit = None
      self.itemClicked.connect(self._itemClicked)
  
imports: from ..Qt import QtCore, QtWidgets
label_desc: Use image node_id 1 to create a new TreeWidget object from inherited base classes: QtWidgets with example: obj = TreeWidget(parent)