Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.7, 5.12.9
-
None
-
Ubuntu 18.04
Description
If model inherited from QAbstractItemModel gets update at the time ListView is creating delegates, then ListView becomes into inconsistent state:
- the view position is set somewhere in the middle, while expected expect position at the beginning;
- currentItem stays null though currentIndex was changed, while expected valid object for currentItem.
To reproduce the issue launch attached example ListViewWithoutCurrentItem.zip.
ACTUAL: window is red, highlighted item is out of view bounds, window's title and logs report that currentItem is null.
EXPECTED: window is green, view is positioned at the first item, the item is highlighted, title reports currentItem's text.
NOTE: This bug only occurs if delegates are created asynchronously and QAbstractItemModel-inherited model gets update during delegate creation.
Attachments
Issue Links
- relates to
-
QTBUG-86744 ListView.isCurrentItem not available until model is refreshed
- Closed