Form 0 0 809 238 Form 10 Button 1 Button 2 <html><head/><body><p>The buttons below have 0 spacing between the in Fusion style.<br/>The solution I found was to override layoutSpacing in my custom style.<br/><br/>//The documentation says this is only used if PM_LayoutHorizontal/VerticalSpacing returns a negative value<br/>//That is not true. In cases where a QBoxLayout is embedded in a QGridLayout which has one spacing overridden, it will fall back to this function via QBoxLayoutPrivate::setupGeom()<br/>int MyStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option, const QWidget* widget) const<br/>{<br/> Q_UNUSED(control1);<br/> Q_UNUSED(control2);<br/><br/><br/> return pixelMetric(orientation == Qt::Horizontal ? QStyle::PM_LayoutHorizontalSpacing : QStyle::PM_LayoutVerticalSpacing, option, widget);<br/>}</p></body></html> true Qt::Vertical 20 40