QML ListView items resizing unexpectedly when using Qt 6.5 with dynamic data updates
I'm integrating two systems and I'm upgrading from an older version and I'm experimenting with I've tried everything I can think of but I have a `ListView` that displays a list of items, and I noticed that the items are resizing unexpectedly when I update the model dynamically. I'm currently using Qt 6.5 and the items are defined within a `Component` that includes a `Rectangle` with a fixed height. However, when the model is updated, the height of some items appears to change, causing a flickering effect. Hereβs a simplified version of my code: ```qml ListView { id: listView width: 200 height: 400 model: myModel delegate: Item { width: listView.width height: 50 // Fixed height Rectangle { width: parent.width height: parent.height color: "lightblue" Text { text: modelData.name anchors.centerIn: parent } } } } ``` I've tried implementing the `ListView` with a `Loader` to see if it helps, but the scenario continues. I also checked the `modelData` to ensure itβs consistent, and it seems to be updating as expected. The flickering happens only when new items are added or when the existing model is refreshed. I get no specific behavior messages in the console; it just appears visually jarring. To address this, I also experimented with setting the `ListView`'s `cacheBuffer` property to a higher value, but it hasn't resolved the resizing scenario. Is there a recommended approach to ensure that the item sizes remain constant during updates? Any guidance on this behavior would be greatly appreciated. Cheers for any assistance! Has anyone else encountered this? What would be the recommended way to handle this? What's the correct way to implement this?