Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.6.0
-
None
Description
Consider the following layout:
// itemX has a minimum size of 50 // itemA and itemB have minimum size of 15 // a sequence A and B addAnchor(layout, Qt::AnchorLeft, itemA, Qt::AnchorLeft); addAnchor(itemA, Qt::AnchorRight, itemB, Qt::AnchorLeft); addAnchor(itemB, Qt::AnchorRight, layout, Qt::AnchorRight); addAnchor(itemX, Qt::AnchorLeft, itemA, Qt::AnchorHorizontalCenter); addAnchor(itemX, Qt::AnchorRight, itemB, Qt::AnchorHorizontalCenter);
Should result in this layout:
| | | +------------+ +------------+ | | | 15 30 60 | | 15 30 60 | | +-----+ +----------------------------------------------+ +-----+ | | itemA | | itemB | | | +-----+------+ +------+-----+ | | | +------------+ | | | | | 50 70 90 | | | | +-----------------------+ +-----------------------+ | | | itemX | | | +------------+ | | |
What would be the sizeAtMinimum for A and B for this layout? Today, A and B won't be simplified into the same sequence, and the problem will be fed to the simplex, risking that the simplex would distribute A:40 and B:60. (Assuming 0 spacing).
The idea of adding anchors to ARBITRARY points in the item, not only the center can help fixing this issue.