Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.3.0, 6.7.2, 6.7.3
-
Linux 32Bit
Description
When a model has a lot of rows (in this example 57000000 rows), then the ListView has drawing problems, as you can see in the following screenshot. At index 2396748, the first visible drawing problems occur.
See ListView_problem_delegate_default_height.jpg
When we scroll to the end then the drawing problems becomes more visible. The distance between the rows increases and it seems that some rows are drawn on top of others.
See ListView_problem_delegate_default_height_at_end.jpg
When the height of the delegate is set to 30 then the drawing problems occur earlier (at about index 2237000):
See ListView_problem_delegate_height_30.jpg
Here is the Qml example code for the ListView, with that the problems can easily be reproduced:
ListView { id: listView anchors.fill: parent model: 57000000 delegate: Text { text: model.index color: ListView.isCurrentItem ? "blue" : "black" } property int pageSize: 1000 Keys.onPressed: { if (event.key == Qt.Key_Home) { currentIndex = 0 positionViewAtBeginning(); } else if(event.key == Qt.Key_End) { currentIndex = count positionViewAtEnd(); } else if(event.key == Qt.Key_PageUp) { currentIndex = currentIndex - pageSize; listView.moveToCurrentIndex(); } else if(event.key == Qt.Key_PageDown) { currentIndex = currentIndex + pageSize; listView.moveToCurrentIndex(); } } function moveToCurrentIndex(){ positionViewAtIndex(currentIndex, ListView.Center); } focus: true MouseArea { anchors.fill: parent onClicked: { listView.currentIndex = 2396748 listView.moveToCurrentIndex(); } } }
The ListView has a simple model with 57000000 rows and a text delegate that prints the index. The current index is drawn in blue, the others black. To find the problem, some navigation logic is implemented: Home, End, PageUp, PageDown, and with a mouse click, the index with the first visible drawing problems is set to the current index and the ListView position is set to this index, so you can see the problem.
Attachments
Issue Links
- is duplicated by
-
QTBUG-82603 Scrolling TableView/ListView with huge number of rows
-
- Closed
-
-
QTBUG-109645 When using listview to display millions of data, the spacing will become larger and smaller
-
- Closed
-
-
QTBUG-127881 Rendering issues at very high coordinates
-
- Closed
-
-
QTBUG-85378 TableView breaks with lots of rows
-
- Closed
-
-
QTBUG-129406 ListView (and TableView) behaves badly for very large models
-
- Closed
-
-
QTBUG-52935 ListView delegates positioned badly due to float roundoff error
-
- Closed
-
- relates to
-
QTBUG-47006 ListView's Delegate has invalid spacing for huge elements number
-
- Reported
-