def takeFromTree(self):
        """
        Takes this item from the tree.
        """
        tree = self.treeWidget()
        parent = self.parent()
        
        if parent:
            parent.takeChild(parent.indexOfChild(self))
        else:
            tree.takeTopLevelItem(tree.indexOfTopLevelItem(self))
def takeFromTree ( self ) : tree = self . treeWidget ( ) parent = self . parent ( ) if parent : parent . takeChild ( parent . indexOfChild ( self ) ) else : tree . takeTopLevelItem ( tree . indexOfTopLevelItem ( self ) )
Takes this item from the tree.