'Called when this item is added or removed from a tree.'

def treeWidgetChanged(self):

    ParameterItem.treeWidgetChanged(self)
    if (self.widget is not None):
        tree = self.treeWidget()
        if (tree is None):
            return
        tree.setItemWidget(self, 1, self.layoutWidget)
        self.displayLabel.hide()
        self.selected(False)
