Hi everyone!

Currently I'm working on a new widget subclass which should implement a control
like the navigation bars known from the MS Office applications. It should like the following screenshot:

navigation.jpg

My basic problem is to layout QPushButtons vertically, without free space between the
QPushButtons. I thought: oh, that's easy. I'll take a QVBoxLayout, add the QPushButtons into that
layout and a vertical spacer at last. I'll set the layout stretch to (0,0,0,...,1), the layout spacing to zero and it will work.
I tried that concept in Designer, and ... it worked.

But in my real implementation, I don't want add pure QPushButtons to the layout, but a special
own widget. And here's the problem: If I subclass QWidget (for example MyButton : public QWidget) and
add instances of that class to the layout,there is always some space between the widgets.
I tried that with a primitive subclass of QWidget which only added a QPushButton. The ui looks now like the screenshot:

header.jpg

I don't understand: where does this space come from?

I tried a lot of things like overriding the minimumSizeHint() function and so on. But nothing helped.
Any ideas are very welcome!