Fix attached subwindows occasionally snapping to minimum size#8387
Open
sqrvrt wants to merge 1 commit into
Open
Fix attached subwindows occasionally snapping to minimum size#8387sqrvrt wants to merge 1 commit into
sqrvrt wants to merge 1 commit into
Conversation
extern-stat
added a commit
to extern-stat/lmms
that referenced
this pull request
May 14, 2026
Contributor
|
Tested this and it works great! I'm not able to replicate #8292 in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8292.
Presumable cause of bug:
QLayout::SetMinAndMaxSizeonSubWindowlayout causes it to calculate minimum and maximum sizes based on all visible children. If (child) window contents widget happens to be marked as hidden when a resize is requested, it does not get included into the layout, and as such the engine thinks there are no children and sets maximum size to 0x0. Then, whenever the child is shown again, minimum (and maximum) sizes are correct again, and window is resized from it's current size (0x0) to closest valid size (i.e. minimum size).Now that i think about it, forcing show on resizeEvent instead of setVisible might cover more (all) cases, but this seems to be enough as it is.