qml datasources

Marco Martin notmart at gmail.com
Fri Jul 8 17:28:16 CEST 2011


On Friday 08 July 2011, Shaun Reich wrote:
> Well, still unable to get my view to display anything with my
> dataengine's sources...I've tried all kinds of variations, too...and
> loads of code examples, including kde and qt's. None nicely match my
> scenario, from what I could tell. I've tried keysForSource, simply
> model: mainEngineSource.sources ...(although that latter one actually
> gives me sources...though I don't know how to retrieve anything in the
> hash from that point, within the viewdelegate).
> 
> As sebas suggested, I tried doing setData("name:" + username,
> "fullName", fullname); setData("name:" + username, "image", image);
> I need to retrieve this in my model. I've tried doing mainEngineSource
> with the DataModel, with sourceFilter: "name:.*" even..I've tried
> outputting it manually just to see what the data looked like
> (console.log()) but the data was there :/

that should work.
you can see what happens in DataModel::dataUpdated in kde-runtime...

what is the use case for the data? does it come from some global source, like 
all users always available in the system, or be an answer to a specific query, 
viasualization specific?


-- 
Marco Martin


More information about the Plasma-devel mailing list