PlugLayout : Stop long summaries expanding widgets below. #1629
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.
When the summary was getting too long, it was requesting more space, and expanding the width of the whole column. The plug widgets in the column were then also expanding to take advantage of the apparent extra space. But often the parent SplitContainer would actually be clipping the widened column to make it fit in the layout, so the long summary was actually just pushing the right hand edges of the plug widgets outside of the clipped area, causing a fair amount of user annoyance.
In an ideal world we'd use "..." to indicate that the summary text is being clipped, but this isn't straightforward, so has been omitted here. The underlying QLabel itself has no built-in functionality for elision, because it supports multiline rich text. It is possible to do manual elision inside a paintEvent() in the case of single line plain text, but we're actually using rich text markup in this case anyway, so the problem appears non-trivial.
One other option would be to use a fade-out gradient to indicate elision, probably based on the actual size not meeting the sizeHint requirements. It seems though that if we were to do this, it would make most sense to do it for the whole column rather than just the label, so we had a prettier visual indication of the plug widgets being clipped too.
So, in short, I wish to punt on the ellipsis for now. Assuming that's acceptable, this addresses IE shotgun ticket 8146.