How to test qml listview with qml TestCase.
-
Hi,
2 questions about testing lisview :-
When using QAbstractModel, how is the
roleaccessible ? I meann, if I have a listview instance, how can I access for example thedisplayvalue 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.itembut It returnsundefined.
delegate: Component { Loader { sourceComponent: switch (display.classtype) { case "ImageSection": { return imageDelegate } case "TextSection" : { return textDelegate } } } }thanks
Jimmy -