Skip to content

Fix scroll bars not showing up when binding to standalone contentItem

908aa77d hid old scroll bars, but didn't account for the situation where the old scroll bars would be put back into place, and so they never showed up.

In the case of the linked bug report, since there was a binding to the ScrollView's contentItem, a default Flickable would be created. After that binding was evaluated, the contentItem was set, causing the scroll bars to be hidden (as part of the process of disconnecting from the old flickable). To fix the issue, we now do the reverse of hideOldItem when a new contentItem is set.

Fixes: QTBUG-104983 Pick-to: 6.2 6.3 6.4 Change-Id: I910259cc3e8f6a6231ae6c87c7d4f0f652bd0545 Reviewed-by: Fabian Kosmale fabian.kosmale@qt.io Reviewed-by: Nate Graham

(cherry picked from qtdeclarative 58bae53237417f28eac6d772fa6ecab657f8a73f)

Merge request reports