Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.0
-
None
Description
QTabWidget calculates its size wrong (at least in win xp style). QWindowsXPStyle::sizeFromContents just returns hardcoded "contentsSize + QSize(6, 6)" so it doesn't take into account pane border width set in stylesheet.
so if you have set following stylesheet "QTabWidget::pane { border: 0px; }" and have widget in tab with minimum height and width of 200px you'll see that you cannot shrink window so widget will become less than 206px. and even without any stylesheet you'll have this widget at least 201px height (width is ok here). this can be easily reproduced even in preview mode of qt designer.
can be workarounded by setting margin/border/padding for pane so summ of their width will be equal 3 (e.g. 1px border and 2px padding).