Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.12.1
-
None
Description
The example works in Qt 5.12.0 and does not in 5.12.1.
Expected:
- Open example and click button to add rectangles to the repeater within the ScrollView.
- The 'contentWidth' value (displayed on the button) should update, and once the rectangles reach the edge of the ScrollView, it should come scrollable.
Actual:
- Open example and click button to add rectangles to the repeater within the ScrollView.
- The 'contentWidth' value (displayed on the button) does not update, and once the rectangles reach the edge of the ScrollView, the ScrollView remains unscrollable.
This means that a ScrollView can no longer dynamically update its scrollability when the content within it changes.
Example for contentWidth:
import QtQuick 2.9 import QtQuick.Controls 2.2 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Scroll") Button { anchors.top: parent.top id: button text: "Click this to add boxes. (contentWidth = " + scrollView.contentWidth + ")" onClicked: repeater.model += 1 } ScrollView { id: scrollView anchors.top: button.bottom anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.right Row { spacing: 2 Repeater { id: repeater model: 5 delegate: Rectangle { height: 50 width: 50 color: "red" } } } } }
Example for contentHeight:
import QtQuick 2.9 import QtQuick.Controls 2.2 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Scroll") Button { anchors.top: parent.top id: button text: "Click this to add boxes. (contentHeight = " + scrollView.contentHeight + ")" onClicked: repeater.model += 1 } ScrollView { id: scrollView anchors.top: button.bottom anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.right Column { spacing: 2 Repeater { id: repeater model: 5 delegate: Rectangle { height: 50 width: 50 color: "red" } } } } }
Attachments
Issue Links
- duplicates
-
QTBUG-74303 ScrollView with Column content won't scroll on Mac and iOS
-
- Closed
-