kinetic-declarative plasma integration

Alan Alpert alanalpert at optusnet.com.au
Mon May 25 02:31:53 CEST 2009


On Monday 25 May 2009 01:23:12 Marco Martin wrote:
> On 5/13/09, Alan Alpert <alan.alpert at nokia.com> wrote:
> > Hi Plasma devs,
> >
> > Those of you following Qt Labs closely will have heard about Qt Kinetic's
> > Declarative UI
> > http://labs.trolltech.com/blogs/2009/05/13/qt-declarative-ui/ . As
> > Declarative UI is targeted towards enhancing the same sorts of
> > applications as Plasma, plasma integration is a good real-world fit. So
> > we've throw something together (it's in
> > playground/base/plasma/kinetic-declarative) and hope that it might be
> > useful in your plans to add Netbook and media center components;
> > declarative UI is designed to help create embedded device style UIs! The
> > Plasma integration we've done allows plasmoids to be written exclusively
> > in QML, or in conjunction with C++. I'll let the blog posting handle all
> > the riveting details on Declarative UI itself, and focus on providing
> > more technical details about the plasma integration we've done.
> >
> > Firstly the suggested plan for the plasma integration is that it lives in
> > playground and is not intended for general use until Qt Declarative
> > stabilizes. Where it goes in terms of technical improvements is unknown;
> > but we'd love to see what people do with it. So far it's not complete,
> > but provides a good glimpse of how Declarative UI could benefit a project
> > like Plasma. Gaps in the integration that we're aware of include setting
> > the background hint from QML, using plasma widgets from QML and
> > refactoring the QML frontend part of the kinetic plasmoid into a library
> > class you can just inherit from and call setQml() on.
> >
> > If you checkout the plasma integration repository you'll find that it
> > provides
> > a script engine that can run packages comprised of QML files, a plasmoid
> > that
> > acts like the qmlviewer program and an example of an applet written in
> > C++ that draws on a QML file for its fluid UI. There is also a file
> > explaining how to use plasma features like the data engines and theme
> > easily in your QML
>
> oh, a problem i've found in this is that if a qml file had some
> keyboard actions defined in it (like a listview that changes the
> active item with arrow keys) they won't work when embedded in the
> plasmoid, while they work fine in qmlviewer (just a wild guess:
> perhaps is due to the fact er're using a qgraphicsview and not a
> qfxview here?)

That's true, and it should be mentioned in the qml-usage-file. You've guessed 
the right reason as well. But of course key events with qgraphicsview is 
another of those things we simply haven't implemented yet, not an intentional 
gap.

-- 
Alan Alpert


More information about the Plasma-devel mailing list