'Create a QAction instance for the widget description item.'

def create_action_for_item(self, item):

    name = item.text()
    tooltip = item.toolTip()
    whatsThis = item.whatsThis()
    icon = item.icon()
    if icon:
        action = QAction(icon, name, self, toolTip=tooltip, whatsThis=whatsThis, statusTip=name)
    else:
        action = QAction(name, self, toolTip=tooltip, whatsThis=whatsThis, statusTip=name)
    widget_desc = item.data(self.WIDGET_DESC_ROLE)
    action.setData(widget_desc)
    action.setProperty('item', item)
    return action
