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

Improve how child items are ignored/skipped


The previous code was a bit rough in how it determined if the item
was supposed to be ignored or not.

For instance, it did not ignore items with
 Layout.maximumWidth: 0
or
 Layout.preferredWidth: 0
 Layout.fillWidth: false

The following patch will use
QQuickLayoutItem::effectiveSizeHints_helper. Since that is now shared,
it should make the behavior more consistent.

The patch also fixes a bug where ignored items (e.g. a hidden item)
was not re-added to the layout if it became visible again. (QTBUG-30796)
We use a QSet to keep track of the ignored items, and repopulate the
layout if any of the items in the QSet changed some properties relevant
for the layout.

Task-number: QTBUG-30796

Change-Id: Ia4b0584ed61e1b24efaca322551f6bb1a4228ca6
Reviewed-by: default avatarRichard Moe Gustavsen <richard.gustavsen@digia.com>
parent 3337fad0
Branches
Tags
No related merge requests found
Showing with 212 additions and 136 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