code: def clear(self):
          
          # go through and properly destroy all the items for this tree
          for item in self.traverseItems():
              if isinstance(item, XTreeWidgetItem):
                  item.destroy()
          
          super(XTreeWidget, self).clear()
docs: Removes all the items from this tree widget.  This will go through
          and also destroy any XTreeWidgetItems prior to the model clearing
          its references.