Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.2
-
None
-
RHEL 8.4
Description
Almost the same example as in QTBUG-96678 but with positionViewAtBeginning() and equally sized delegates:
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") // Bare ListView (not wrapped in a ScrollView) shows up correctly ScrollView { anchors.fill: parent clip: true ListView { id: lv model: 1000 // TopToBottom lists get positioned correctly even when in ScrollView verticalLayoutDirection: ListView.BottomToTop delegate: Text { width: lv.width text: index } // The following line may be or may not be there, the effect is the same // Component.onCompleted: positionViewAtBeginning() } } }
Instead of a list view positioned at the beginning (i.e. at the bottom), I see a blank (scrollable) canvas with no signs of delegates first, with the vertical scroll bar all the way to the bottom and contentHeight seeming to match the content height of the list view as it should be. Scrolling it almost all the way up suddenly reveals bottom delegates (from 0 upwards, correctly ordered and drawn) and resets the vertical scroll bar back to the bottom, now reflecting the list view's actual whereabouts.