Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.3
-
None
Description
In this example I have a QBoxLayout embedded in a QGridLayout. The QGridLayout has the verticalSpacing set, but not the horizontalSpacing. I would expect the QBoxLayout spacing to fall back to QStyle::PM_LayoutHorizontalSpacing. It does not, instead a spacing of 0 is used.
By stepping through this I found I could fix it by overriding QStyle::layoutSpacing, but that directly contradicts that documentation for layoutSpacing, which claims it is ignored unless PM_LayoutHorizontalSpacing is negative.
It can also, obviously, be worked around by manually setting the spacing for the QBoxLayout.