Qml List View Crash
-
I am able to crash my qml program by destroying a listview while its items are still animating/moving. I get the following error:
@
QML Component: Delegate component must be Item type.
QDeclarativeContext: Cannot set property on invalid context.
QDeclarativeContext: Cannot set context object on invalid context.
QDeclarativeComponent: Cannot create a component in an invalid context
<Unknown File>: QML VisualDataModel: Error creating delgate
QDeclarativeContext: Cannot set property on invalid context.
QDeclarativeContext: Cannot set context object on invalid context.
QDeclarativeComponent: Cannot create a component in an invalid context
<Unknown File>: QML VisualDataModel: Error creating delgate
QDeclarativeContext: Cannot set property on invalid context.
QDeclarativeContext: Cannot set context object on invalid context.
QDeclarativeComponent: Cannot create a component in an invalid context
<Unknown File>: QML VisualDataModel: Error creating delgate
QDeclarativeContext: Cannot set property on invalid context.
QDeclarativeContext: Cannot set context object on invalid context.
QDeclarativeComponent: Cannot create a component in an invalid context
<Unknown File>: QML VisualDataModel: Error creating delgate
QDeclarativeContext: Cannot set property on invalid context.
QDeclarativeContext: Cannot set context object on invalid context.
QDeclarativeComponent: Cannot create a component in an invalid context
<Unknown File>: QML VisualDataModel: Error creating delgate
QDeclarativeContext: Cannot set property on invalid context.
QDeclarativeContext: Cannot set context object on invalid context.
QDeclarativeComponent: Cannot create a component in an invalid context
<Unknown File>: QML VisualDataModel: Error creating delgate
QDeclarativeContext: Cannot set property on invalid context.
QDeclarativeContext: Cannot set context object on invalid context.
QDeclarativeComponent: Cannot create a component in an invalid context
<Unknown File>: QML VisualDataModel: Error creating delgate
QDeclarativeContext: Cannot set property on invalid context.
QDeclarativeContext: Cannot set context object on invalid context.
QDeclarativeComponent: Cannot create a component in an invalid context
<Unknown File>: QML VisualDataModel: Error creating delgate
*** glibc detected *** /usr/local/Trolltech/Qt-4.7.0/bin/qmlviewer: double free or corruption (out): 0x088f4760 ***... Stack dump
@The listview is destroyed because it is a sub item of another listview item, when that listview item goes off the screen the item gets destroyed. That's what causes the crash. It there a work around for this?
-
A work around could be to stop the list view from animating/moving. Is there a proper way of doing this. At the moment i'm doing this by setting interactive property to false and back to true. But the problem is this only works if the list view was changed by the user swiping the list view. If I set the current index to some number and this causes the list view to animate changing the interactive property will not stop the animation. With that in mind is there a proper way of stopping a list view from animating.