We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7447b7 commit c559bd2Copy full SHA for c559bd2
qwt/legend.py
@@ -390,7 +390,8 @@ def sizeHint(self):
390
:return: a size hint
391
"""
392
sz = QwtTextLabel.sizeHint(self)
393
- sz.setHeight(max([sz.height(), self.__data.icon.height() + 4]))
+ icon_height = 0 if self.__data.icon is None else self.__data.icon.height()
394
+ sz.setHeight(max([sz.height(), icon_height + 4]))
395
if self.__data.itemMode != QwtLegendData.ReadOnly:
396
sz += buttonShift(self)
397
return sz
0 commit comments