Thanks :-) If you're at it anyway, maybe you want to add two other patches for another crash (QTBUG-138201) and some really annoying rendering bug (QTBUG-133845)?
These would be the patches:
From 2c8692adaed1c3374ca01842e166af79ed3861cc Mon Sep 17 00:00:00 2001
From: Axel Spoerl <[email protected]>
Date: Thu, 3 Jul 2025 07:35:37 +0200
Subject: [PATCH] QMainWindowLayout::animationFinished(): don't show deleted
tab bars
QMainWindowLayout::animationFinished(): looped over a copy of the
usedTabBars member and showed all tab bars in the container.
Showing a tab bar, can cause another in the container to become unused.
Unused tab bars were kept in a separate container and re-used, before
a3f0ce4c0d0627ef979052b34b21e6fd2bdc3acf changed this logic and deleted
unused tab bars.
This caused a regression: show() was called on a deleted tab bar,
causing a crash.
Only show tab bars from the copied container, if usedTabBars still
contains them.
Fixes: QTBUG-138201
Pick-to: 6.10 6.9
Change-Id: I33de57ab3276d1f786d27f63aebfe8ba8ddc2832
Reviewed-by: Samuel Gaist <[email protected]>
Reviewed-by: Marc Mutz <[email protected]>
---
src/widgets/widgets/qmainwindowlayout.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index 87c33932a8d..a1a4cfc2ce0 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -2673,8 +2673,10 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
parentWidget()->update(layoutState.dockAreaLayout.separatorRegion());
#if QT_CONFIG(tabbar)
const auto usedTabBarsCopy = usedTabBars; // list potentially modified by animations
- for (QTabBar *tab_bar : usedTabBarsCopy)
- tab_bar->show();
+ for (QTabBar *tab_bar : usedTabBarsCopy) {
+ if (usedTabBars.contains(tab_bar)) // Showing a tab bar can cause another to be deleted.
+ tab_bar->show();
+ }
#endif // QT_CONFIG(tabbar)
#endif // QT_CONFIG(dockwidget)
}
--
2.49.0
and
From 877d352e490fc80b87dc76b53f4877fbd91c1b08 Mon Sep 17 00:00:00 2001
From: Christian Ehrlicher <[email protected]>
Date: Fri, 11 Jul 2025 08:34:50 +0200
Subject: [PATCH] QStyleSheetStyle: Don't calc size for CT_SpinBox when not
handled
The default stylesheet for CT_SpinBox defines a native border which was
added to the sizeHint even though it was already added by the base
style.
Amends 96adebed606cdbc73c73778917d777dc04c6e93e.
Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-133845
Task-number: QTBUG-130642
Task-number: QTBUG-132431
Change-Id: I2332c4f027a8f4cceb477ae239c348509e6e7356
Reviewed-by: Volker Hilsheimer <[email protected]>
---
src/widgets/styles/qstylesheetstyle.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 08178e7b685..f4b21d3b70d 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -5269,7 +5269,11 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
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 (rule.hasBox() || !rule.hasNativeBorder())
+ sz = rule.boxSize(sz);
+ return sz;
+ }
+ if (spinbox->buttonSymbols != QAbstractSpinBox::NoButtons) {
// Add some space for the up/down buttons
QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton);
if (subRule.hasDrawable()) {
--
2.49.1
(I filed all of the bugs, so I know these ;-)