QML Plasmoids and complex configs
David Edmundson
david at davidedmundson.co.uk
Sat Mar 17 17:07:24 UTC 2012
I've been given the impression that all plasmoids are moving to QML,
and as such I'm trying to make sure that happens in my project, KDE
Telepathy.
>From my understanding QML plugins can only use configs by shipping a
.ui file, and the XML config file.
This doesn't really cut our needs in one of our configs. We have a
config (in contact-applet) that shows a tree view of available
contacts. This is far beyond what I can do in just QtDesigner and I
currently need my C++ applet to do this.
Are C++ applets being phased out?
Will there be a way to use QtScript in the config?
Are the config dialogs going to be moved to QML?
None of the above?
I /can/ work round this by making a widget that has everything I want
with the relevant user q_property and then making a QtDesigner plugin
which exposes this widget so that Qt::UiLoader can load it. (I use
this approach in LightDM-KDE which has a very similar config mechanism
to plasma applets).
However if lots of people do it, it will get very messy with libraries
going everywhere.
However, I felt it's something that's probably going to come up when
porting a lot of applets, such as pastebin or the comics plasmoid,
both of these load models in their config UIs, so will have the same
problems.
Side note, for someone who's developing a lot of stuff /on/ Plasma but
not really involved /in/ Plasma there's not a lot of public
communication about the general roadmap of Plasma2. On techbase
there's simply a line that says "This is now the recommended method of
creating plasmoids," on the QML section but you would actually miss if
you click on any of the links to any of the other languages. I have to
pick up most my information from hearsay/developer conversations and
then fill the rest in with guesses.
I'm not trying to rant, and possibly I'm looking in the wrong places,
but if I'm struggling to find an official word of "this is how you
should be writing plasmoids that will work 2 years from now", so will
lots of people - and that's something that needs to be addressed, even
if only in a blog post.
David Edmundson.
More information about the Plasma-devel
mailing list