[Interest] Qt Quick 2.x Complex ListView

Kristoffersen, Even (NO14) Even.Kristoffersen at Honeywell.com
Tue May 20 09:28:32 CEST 2014

> 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.


More information about the Interest mailing list