Listview index increments on screen rotation
-
Hi,
Anyone encountered this issue? Any advise?
Here is the sample ListView
ListView { id: wizardList property int delegateArea anchors.fill: parent focus: true boundsBehavior: Flickable.StopAtBounds highlightRangeMode: ListView.StrictlyEnforceRange orientation: ListView.Horizontal snapMode: ListView.SnapOneItem cacheBuffer: delegateArea //model: wizardModel delegate: WizardDelegate { Component.onCompleted: { wizardList.delegateArea = width * height; } } }
- Flick the ListView to show item 2
- Rotate the screen from portrait to landscape
- item 2 is still the visible item
- Rotate again the screen from landscape to portrait
- The visible item is now item 3
Once you repeat the process, step 5 always increments the index.
I tried setting the cacheBuffer into 0, they same results when running the steps above.
However, when I tried to flick back after the index increments, it won't increment anymore when changing orientation.Setting cacheBuffer to 0 it will affect the smothness when flicking items.
Thanks.
-
I found this the same issue before but it was tagged as out of scope. :(
https://bugreports.qt.io/browse/QTBUG-20332?jql=text ~ "listview screen rotation"
There's a comment stating that this works in QtQuick 2 however from my end it is still happening.
Am i the only one experiencing this?
-
I'm facing same issue and its still reproducible in Qt 5.5.0 Android. I think it is reproduced when we do some heavy operations inside list delgate.
-
HI guys,
If you are still experiencing the behavior with Qt Quick 2 then please open a new report with a minimal compilable example that shows the behavior.
However, you should first test it against the latest version of Qt. Currently 5.7