[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Accessing models from QML plasmoid
From: Marco Martin <notmart () gmail ! com>
Date: 2011-06-19 17:34:42
Message-ID: 201106191934.42936.notmart () gmail ! com
[Download RAW message or body]
On Sunday 19 June 2011, Shantanu Tushar Jha wrote:
> Hi,
>
> I am having the same doubt, I guess Marco can answer :)
>
> Shantanu Tushar (UTC +0530)
> http://www.shantanutushar.com
>
> On Sat, Jun 18, 2011 at 12:37 AM, Francesco Nwokeka <
>
> francesco.nwokeka@gmail.com> wrote:
> > Hi all,
> >
> > I'm working on a GSoC project and creating plasmoids for
> >
> > kde-telepathy. I would like to know
> > from you guys, which would be the right approach to read info from a
> > model we have that retrieves
> > it's info from nepomuk.
> >
> > Do I have to wrap this model as a dataengine, or is there a better way to
> > use a pre-existing
> > QAbstractItemModel in Plasma-QML?
to work in qml a qabstractitemmodel needs:
* one single column
* roles with actual names (assigned with setRoleNames)
to be "seen" is either setContextProperty from C++ (but in this case you can't
do a qml-only plasmoid, it would have to be mixed qml c++)
or be exported in a plugin (that is then used with the import keyword)
in this case the model would be created and instantiated from within qml
in general, i prefer models in qml itemviews to be actual models, in
libplasma2 i would instead like to have model support directly into the
dataengine, that would be way cleaner, but unfortunately, not yet..
Cheers,
Marco Martin
_______________________________________________
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