How to test qml listview with qml TestCase.
Unsolved
QML and Qt Quick
-
Hi,
2 questions about testing lisview :-
When using QAbstractModel, how is the
role
accessible ? I meann, if I have a listview instance, how can I access for example thedisplay
value of thecurrentItem
? Which is obejct is the parent ofdisplay
? -
I have this kind of conditional delegate : how can I access the current delegate to test if the good type Is created. I tried
myListView.currentItem.item
but It returnsundefined
.
delegate: Component { Loader { sourceComponent: switch (display.classtype) { case "ImageSection": { return imageDelegate } case "TextSection" : { return textDelegate } } } }
thanks
Jimmy -