diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-10-23 00:24:51 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-10-26 00:57:36 +0200 |
commit | da632baf34ef2308da04c56c497e115b9d1ad531 (patch) | |
tree | d47e887049c0a7a8e9f35a7fda25186bb6185db7 /examples/widgets/widgets/groupbox | |
parent | 0921caf9769c84192c539db22085d343f1a4b5b1 (diff) |
QTabBar: re-layout when tab size hint depends on selected state
QTabBar caches the rects for the tabs to avoid costly recalculation of
each tab's size hint. That cache is only updated via layoutTabs if the
entire tab bar is resized or modified. However, when a style sheet is
set that calculates a different size hint for tabs that are selected,
then the tab bar also needs to be laid-out when the current tab changes.
To minimize the cost, compare the cached size for the new current tab
with its new size hint, and re-layout the tabs when they are different.
Fixes: QTBUG-6905
Fixes: QTBUG-8209
Pick-to: 6.2
Change-Id: I110444d18938c2b3446ee58e4a8c6c472b5f12c3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/widgets/widgets/groupbox')
0 files changed, 0 insertions, 0 deletions