Fix tab sizing when we get a QPainter and not a QStylePainter
I'm not sure yet how that happens, but I got a crash report for that. See #3099
This commit is contained in:
parent
e766fe14fc
commit
e89fda189a
@ -657,7 +657,7 @@ class TabBarStyle(QCommonStyle):
|
||||
icon_state = (QIcon.On if opt.state & QStyle.State_Selected
|
||||
else QIcon.Off)
|
||||
icon = opt.icon.pixmap(opt.iconSize, icon_mode, icon_state)
|
||||
p.drawItemPixmap(layouts.icon, Qt.AlignCenter, icon)
|
||||
self._style.drawItemPixmap(p, layouts.icon, Qt.AlignCenter, icon)
|
||||
|
||||
def drawControl(self, element, opt, p, widget=None):
|
||||
"""Override drawControl to draw odd tabs in a different color.
|
||||
|
Loading…
Reference in New Issue
Block a user