'Set the widget category.'

def setWidgetCategory(self, desc):

    self.category_description = desc
    if (desc and desc.background):
        background = NAMED_COLORS.get(desc.background, desc.background)
        color = QColor(background)
        if color.isValid():
            self.setColor(color)
