Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.15.7, 6.4.0
-
None
Description
If there are delegates of different sizes in the ListView
Then when scrolling, the scrollbar starts jumping and changing size
Code example:
import QtQuick import QtQuick.Controls ApplicationWindow { id: mainWindow visible: true width: 1600 height: 1070 Component.onCompleted: { for (let i = 0; i < 100; i++) { var data = {'name': new Date().toTimeString(), 'itemHeight': Math.random()*1000}; fruitModel.append(data) } } ListModel { id: fruitModel } ListView { id: listView anchors.fill: parent spacing: 2 model: fruitModel ScrollBar.vertical: ScrollBar { } delegate: Rectangle { height: itemHeight width: listView.width Text { text: name } color: Qt.rgba(Math.random(),Math.random(),Math.random(),1); } } }
A video with a reproduction of the problem is attachedĀ problem.mov
Attachments
Issue Links
- duplicates
-
QTBUG-76830 QML ListView with variable sized delegates causes attached scroll bar to change sizes and skip around in an unwanted manner
- Closed