'Called when this item has been selected (sel=True) OR deselected (sel=False)'

def selected(self, sel):

    ParameterItem.selected(self, sel)
    if (self.widget is None):
        return
    if (sel and self.param.writable()):
        self.showEditor()
    elif self.hideWidget:
        self.hideEditor()
