Reimplements the :meth:`QStyledItemDelegate.sizeHint` method.

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

        document = QTextDocument()
        document.setDefaultFont(option.font)
        data = index.model().data(index)
        text = umbra.ui.common.QVariant_to_string(data)
        self.__label.setText(text)
        document.setHtml(text)
        return QSize(document.idealWidth() + self.__indent, option.fontMetrics.height())