d7c6734a2b281e12f93d047182e78dc235f61a2c
A widget created under an already-visible parent starts hidden, and a layout counts a hidden item as empty -- it adds nothing to the size hint. Nothing showed the freshly built rows until the event loop next ran, long after the panel had measured itself, so every rebuild measured an empty card. That one fact explains both symptoms. Originally refit() read a stale cached hint, which described the previous context and so drew the card one rebuild behind. Invalidating that cache to fix it replaced a plausible wrong answer with the true one for a card whose rows were all still hidden, which is why the panel then collapsed to its heading on every mode change. Measured on a forced rebuild, with the rows shown and without: shown: rowItems=10 hidden=0 rowsHint=188 needed=140x221 hidden: rowItems=10 hidden=10 rowsHint=6 needed=72x39 39px being heading plus margins -- the collapsed card exactly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHcUerKAZKWNvSKJxYKbnG
Description
No description provided
Languages
C++
96%
CMake
2.2%
Python
1.2%
C
0.6%