501 - not implemented
501 - not implemented

Reputation: 2688

Create a ListView with dynamic parameters in QML

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

Answers (1)

Kakadu
Kakadu

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

Related Questions