Reputation: 2688
is there a method to create a ListView with dynamic parameters (for example for the model?)
I want to create this qml item dynamically:
Item{
id:item
ListView{
id:listitem
spacing: 5
width:list.width
height:list.height/3
orientation: ListView.Horizontal
model: imageModelX //variablename is dynamic
delegate: Delegate{
....
}
}
}
Best regards
Upvotes: 2
Views: 1537
Reputation: 2839
I have resolved similar problem by adding to main model role that returns inner models. Code is here: https://github.com/Kakadu/qml-test-2
Upvotes: 3