> Subject: [Interest] Qt Quick 2.x Complex ListView
>
> Hello QTers:

> Does anybody have an idea on how to create each row of the listview with a 
> delegate that allows for each row > to be rendered with separate logic 
> instead of the standard delegate which renders each row with the same or > 
> very similar logic.

> Any comments or tips would be useful and I am sure more people would like 
> this option

Not sure if it covers what you need, but I believe the common way to solve this 
is through using a Loader element as the delegate and changing the source 
depending on your criteria for which row delegate to use on the fly.

ListView {
        id: example
        delegate: Loader {
                function getDelegate() { ... }
                source: getDelegate()
        }
}

Use the getDelegate() function to return the url for the delegate to use.

You can use a similar trick inside the delegate item itself instead (or in 
addition) if you create separate elements for the different type of columns 
that you need to render, then you can use a Row with Loaders for example.


-Even
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to