I have a large layout that contains widgets and layouts of the following structure:
QVBoxLayout QTableView QPushButton
I set the margins, margins, and spacing on the layout to 0. The way this applies to Mac OS X, the button does not fill all its space. Instead, there is a gasket around it. Magically, the layout seems to be aware of this and ensures that the look of the table is as wide as the wide button:

When I remove the button, the table view reverts to full width:

How can I change it so that the button as well as the table view becomes as wide as the layout?
I played with indentation and style fields, and although I can use them to make the button wider, an extra padding around the tree image remains. The only solution I have so far is to wrap the button in another widget and then set its margin and indentation to 0 through the stylesheet, but then I lose the rounded look.
source share