QML model with image and text per element

Marco Martin notmart at gmail.com
Sun Jun 26 19:26:10 CEST 2011


On Sunday 26 June 2011, Shaun Reich wrote:

> But basically I want it to display the text from userListFullNames,
> and display the icon for each user's name. I don't know how to do
> this..I thought about keeping dataSource:... the same, and then in my
> delegate, where I create a Text object, I would set the text to be a
> lookup of the icon for that name.
> 
> Even if I were to try that approach (although I'm sure there's a
> better way), how should I lay out the data for it? Any ideas?

all depends on... exactly what do you have as available data in the 
model/dataengine? and what you could put?

better way to me is having a field called image, icon, thubnail or whatever 
makes sense directly in the dataengine, what problems do you have to do so?

Cheers,
Marco Martin


More information about the Plasma-devel mailing list