Override subElementRect properly.

This commit is contained in:
Florian Bruhin 2014-07-14 23:31:45 +02:00
parent cd19697a77
commit 367ecb0e44

View File

@ -215,10 +215,9 @@ class TabBarStyle(QCommonStyle):
self._style = style
for method in ('drawComplexControl', 'drawItemPixmap',
'generatedIconPixmap', 'hitTestComplexControl',
'pixelMetric', 'subElementRect',
'itemPixmapRect', 'itemTextRect', 'polish', 'styleHint',
'subControlRect', 'unpolish', 'drawPrimitive',
'drawItemText', 'sizeFromContents'):
'pixelMetric', 'itemPixmapRect', 'itemTextRect',
'polish', 'styleHint', 'subControlRect', 'unpolish',
'drawPrimitive', 'drawItemText', 'sizeFromContents'):
target = getattr(self._style, method)
setattr(self, method, functools.partial(target))
super().__init__()