E-Mail von Tobias Leupold vom Montag, 17. März 2025, 22:50:
> E-Mail von Albert Astals Cid vom Montag, 17. März 2025, 20:38:
> > Can you bisect in which commit the behaviour was introduced?
> 
> According to what was said on the Qt forums, it should be those two:
> 
> https://codereview.qt-project.org/c/qt/qtbase/+/601315
> https://codereview.qt-project.org/c/qt/qtbase/+/613831
> 
> cf. https://forum.qt.io/topic/160958/
> 
> Cheers, Tobias

Just as a follow-up: It were definitely those two commits that cause the 
issue. I just tested it out and patched them away, using qtbase 6.8.2 and the 
attached patch. Afterwards, QSpinBoxes look like before, no matter if a style 
sheet is set or not.

Maybe we could at least add some workaround to Breeze, even if it's Qt's 
fault?!
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index f5981da4593..c89b0614a42 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -5299,9 +5299,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
 #if QT_CONFIG(spinbox)
     case CT_SpinBox:
         if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {
-            if (rule.baseStyleCanDraw()) {
-                sz = baseStyle()->sizeFromContents(ct, opt, sz, w);
-            } else if (spinbox->buttonSymbols != QAbstractSpinBox::NoButtons) {
+            if (spinbox->buttonSymbols != QAbstractSpinBox::NoButtons) {
                 // Add some space for the up/down buttons
                 QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton);
                 if (subRule.hasDrawable()) {

Reply via email to