Bug 377173

Summary: QTabWidget & QTabBar have different spacing in document mode between tabbar and controlled container view
Product: [Plasma] Breeze Reporter: Friedrich W. H. Kossebau <kossebau>
Component: QStyleAssignee: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Status: RESOLVED WORKSFORME    
Severity: normal CC: hugo.pereira.da.costa
Priority: NOR    
Version First Reported In: 5.9.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: main.cpp, for demoing the difference
demo.pro, for building the demo app
Screenshot with Breeze style

Description Friedrich W. H. Kossebau 2017-03-03 17:00:52 UTC
Created attachment 104348 [details]
main.cpp, for demoing the difference

When using both a stock QTabWidget and a self-made variant of such a widget (e.g. when creating pages only on the fly) using QTabBar, and doing that with both versions using the documentMode*, the padding between the tabbar separation line and the page is inconsistent, other than expected.

See attached demo app for the inconsistency.

Of course it could be questioned who should be responsible to ensuring the padding between a QTabBar and the container view it is controlling.
In Oxygen style the QTabBar even has a greater padding between bar separation line and widget border, so the concept of having the padding as part of the qtabbar seems acceptable, and might not come as such a surprise?

* See
https://doc.qt.io/qt-5/qtabwidget.html#documentMode-prop
https://doc.qt.io/qt-5/qtabbar.html#documentMode-prop
Comment 1 Friedrich W. H. Kossebau 2017-03-03 17:01:34 UTC
Created attachment 104349 [details]
demo.pro, for building the demo app
Comment 2 Friedrich W. H. Kossebau 2017-03-03 17:06:56 UTC
Created attachment 104350 [details]
Screenshot with Breeze style
Comment 3 Hugo Pereira Da Costa 2017-03-03 17:55:06 UTC
Hi Friedrich,

thanks for reporting and sending the test app. 
I assume it looks right with stock themes (fusion, and/or plastique, depending on the Qt version).

i remember having fiddled with this in the past (Qt4 and oxygen), and not found an acceptable way to fix. if I remember the issue was connected to the rounding at the corners in an (non document mode) tab widget, which was requiring some extra spacing in the tabbar, not needed in QTabBar mode, and not properly cancelled in document mode. 

Still, I'll have another look.

Hugo
Comment 4 Justin Zobel 2022-11-03 01:40:27 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 5 Bug Janitor Service 2022-11-18 05:15:32 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2022-12-03 05:19:18 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!