Commit 0c935730 authored by Jan Arve Saether's avatar Jan Arve Saether Committed by The Qt Project
Browse files

Rearrange only the topmost layout.


Since we also rearrange in geometryChanged(), this should ensure
that we recurse down and arrange all sublayouts.

This assumes that objects are constructed in bottom-up order.
(That's what componentComplete() indicates.)

Previously we would risk rearranging sublayouts several times:
1. Sublayout got componentComplete -> geometryChanged -> rearrange()
2. Parent layout got componentComplete -> geometryChanged -> rearrange()
3. Since the sublayout was a layout item of the parent layout it could
   get a geometry change again, causing it to rearrange again.

This also fixes the issue where the implicitWidth/Height of the layout
was not immediately set after componentComplete, which could cause it
to get the wrong initial size.

Change-Id: I63a35dd934cd3ace01fab6319333d531631a6f4e
Reviewed-by: default avatarFrederik Gladhorn <frederik.gladhorn@digia.com>
parent 5145aec4
Branches
No related merge requests found
Showing with 93 additions and 32 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment