self.__text.setFont(font)
def sizeHint(self, size_hint, size_constraint=None, *args, **kwargs):
return QSizeF(self.__text.boundingRect().size())
class LegendItem(QGraphicsLinearLayout):
Legend item - one entry in the legend.
After Change
self._size_hint = QSizeF(self.__text.boundingRect().size())
def sizeHint(self, size_hint, size_constraint=None, *args, **kwargs):
return self._size_hint
class LegendItem(QGraphicsLinearLayout):
Legend item - one entry in the legend.