Respect widget's minimum size when showing a placeholder rectangle during move

Respect widget's minimum size when showing a placeholder rectangle during move

Otherwise, the placeholder would show up in any small space, even if the item doesn't actually end up being positioned there.

The implementation is a bit of a hack (reusing the item's Layout attached for the placeholder item), but it makes sure that the actualy widget and its placeholder use the same codepaths. All existing code that deals with the m_layoutAttached should be fine with this and we're immediately unsetting it again to prevent any problems. Alternatively, we would have to push the minimum size to AbstractLayoutManager::candidateGeometry in some other way, which seems more error-prone since it effectively duplicates the minimum size logic.

Screenshots or screen recordings

Before After

Merge request reports

Loading