diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index a1824a1df7b..d8b6f6fdfe2 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -5297,6 +5297,8 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op #if QT_CONFIG(spinbox) case CT_SpinBox: if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast(opt)) { + if (rule.baseStyleCanDraw()) + return baseStyle()->sizeFromContents(ct, opt, sz, w); if (spinbox->buttonSymbols != QAbstractSpinBox::NoButtons) { // Add some space for the up/down buttons QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton);