[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: QML model with image and text per element
From:       Shaun Reich <predator106 () gmail ! com>
Date:       2011-06-26 18:46:56
Message-ID: BANLkTi=NjNc4DEZPRhDj=WxYeaXdiL2XOQ () mail ! gmail ! com
[Download RAW message or body]

> well, i don't know how that data engine is done, but usually when representing
> a list of items they are done this way:
> sone source per item, like
> source called as the login, then one key per "role" for instance a key with
> login one with name, one with user image...
> from the dataengine you do for instabce setData("john", "name", "John Doe")


> alternatively, the source could be a functionality, like "userList", then
> userList will have a key for each user and then the same structure: every item
> a varianthash with all the user data...

The latter method seems the better route honestly. or at least I like
it the most. the other one, looks like it doesn't map very well to my
uses...although I can easily be convinced otherwise, if you hate my
api ;p

Okay, so if the data is laid out as you said, in the last example..how
would I display that in the qml view? Since I need to display *both*
the icon and the user's name in the model. Give me something concrete,
please -- as you well know, the docs suck ;-)

-- 
Shaun Reich,
KDE Software Developer (kde.org)
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic