PDA

View Full Version : QTabWidget setCornerWidget adds some small white margins (OS X)



Alex Novichkov
19th September 2015, 07:55
Hello everyone. I've stumbled on a small but very unpleasant bug in the QTabWidget->setCornerWidget method. If I'm trying to add any widget (except QToolButton) into the top right corner, this adds a small white gap right on top of my widget. I'm trying to add my own QToolButton with slightly changed paintEvent (to get rid of the QToolButton whityish button). Can you simply push me into the right direction how to remove this white gap?
BTW it seems that the top left corner works just as I expect, unfortunately this isn't an option.
[11383

anda_skoa
19th September 2015, 10:57
Does this happen with every widget, e.g. when you use a QLabel?
Have you tried with a different widget style to see if the current one might be interfering?

Cheers,
_

Alex Novichkov
19th September 2015, 11:27
Yes, indeed, this happens with other widgets as well - QLabel, QPushButton. I think the trick here is how QToolButton (native one) paints itself beside QTabBar, but I didn't manage to understand how it's achieved in the Qt src.
BTW, Qt 5.5.0, OS X Mavericks