How to use the source file that I passed the path in a property of the Item as model/delegate of the ListView inside the Item
Im trying to create an Item where I can pass as a property an string containing the path to a source file that contains the model/delegate/both and use them in the ListView inside the item
Some stuff that i tried was
And some variations of that, but none seemed to work, some return reference errors from delegate not seeing the model and others just doesnt draw anything on the screen. I also tried using VisualDataModel and loading them but same results
Is there anyway to do what I want or I should create a few versions of the Item each one with their model/delegate?
Thanks in advance
Gianluca last edited by
I'm not sure how to resolve, but looking at your solution I notice one thing:
The model require an object (an instantiated component like ListModel, etc), while delegate require a component (not an object).
Your first solution create two objects, so maybe delegate do not get the right thing.
Your second solution create two components, so maybe this time is the model that do not get the right thing.
Try to mix them.
It worked! Thanks.
But my problem now is a seg fault with a few Elements in the ListModel. With only 8 elements, I get instant seg fault when I try to run the application. Im now trying to solve it.