Handle invalid layout in TabBarStyle.subElementRect
This commit is contained in:
parent
14c2536a9d
commit
c59b6bf02b
@ -681,6 +681,9 @@ class TabBarStyle(QCommonStyle):
|
||||
"""
|
||||
if sr == QStyle.SE_TabBarTabText:
|
||||
layouts = self._tab_layout(opt)
|
||||
if layouts is None:
|
||||
log.misc.warning("Could not get layouts for tab!")
|
||||
return QRect()
|
||||
return layouts.text
|
||||
elif sr == QStyle.SE_TabWidgetTabBar:
|
||||
# Need to use super() because we also use super() to render
|
||||
|
Loading…
Reference in New Issue
Block a user