def paint(self, painter, option, index):
        """
        Reimplements the :meth:`QStyledItemDelegate.paint` method.
        """

        if option.state & QStyle.State_MouseOver:
            styleSheet = self.__style.hover
        elif option.state & QStyle.State_Selected:
            styleSheet = self.__style.highlight
        else:
            styleSheet = self.__style.default

        self.__label.setStyleSheet(styleSheet)
        data = index.model().data(index, Qt.DisplayRole)
        self.__label.setText(umbra.ui.common.QVariant_to_string(data))
        self.__label.setFixedSize(option.rect.size())
        painter.save()
        painter.translate(option.rect.topLeft())
        self.__label.render(painter)
        painter.restore()