From eb4304f39c706862fa698dc59122ae95fc58c26c Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Tue, 30 Apr 2024 19:59:16 +0100 Subject: [PATCH] Postpone relayouting during deserializing During deserializing we're layouting all stuff. It can happen that a QWidget's min-size changes for whatever weird reason, and messes up our math. It's fine that min-size changes, but do it before layouting. --- src/qtwidgets/views/Group.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtwidgets/views/Group.cpp b/src/qtwidgets/views/Group.cpp index 7fee2bd29..ccf9f890b 100644 --- a/src/qtwidgets/views/Group.cpp +++ b/src/qtwidgets/views/Group.cpp @@ -50,7 +50,7 @@ class VBoxLayout : public QVBoxLayout // clazy:exclude=missing-qobject-macro if (auto item = m_groupWidget->group()->layoutItem()) { if (auto root = item->root()) { - if (root->inSetSize()) { + if (root->inSetSize() || root->isDeserializing()) { // There's at least one item currently in the middle of a resize // schedule relayout, do not interrupt. QTimer::singleShot(0, m_groupWidget, [this] {