QML model with image and text per element
Shaun Reich
predator106 at gmail.com
Sun Jun 26 02:15:34 CEST 2011
I have a PathView which displays icons which are retrieved from a
dataengine...this is for kdm btw..
The icons are retrieved through e.g...
model: PlasmaCore.DataModel {
dataSource: mainEngineSource.keysForSource['userListFullNames']
}
I'd like that PathView to display the user icons ("faces"), as well as
text below the image. The items are stacked vertically.
mainEngineSource is a "source" which is connected to mainengine and
handles most of the data...my api contains userlist,
userlistfullnames, and (maybe? userIcons). I wasn't sure if I should
condense those data entries into one or more...
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?
--
Shaun Reich,
KDE Software Developer (kde.org)
More information about the Plasma-devel
mailing list