Settings for pure QML applet

Sebastian Kügler sebas at kde.org
Wed May 1 10:29:52 UTC 2013


On Wednesday, May 01, 2013 06:06:04 Jan Grulich wrote:
> > On Wednesday, May 01, 2013 11:45:22 Jan Grulich wrote:
> > > Maybe something like this may solve my problem. I can create custom C++ 
> > > widget and expand it to QML and then open it in
> > > PlasmaComponents.Dialog. 
> > 
> > How do you mean "Write custom C++ wigdet and expand it to QML"?
> 
> Like we have with the traffic monitor in plasma-nm. It's QWidget written in
> C++ and expanded as QML plugin via qmlRegistertype().

Ah, that needs reimplementation anyway. The safest thing to do is make it a 
QDeclarativeItem, implement the paint() method. That will allow relatively 
easy porting to QtQuick2 (it will become a QQuickPaintedItem then.)

> > > The second thing I need is saving QStringList via plasmoid.writeEntry() 
> > > in QML and I don't know if this is possible. I know that it's possible 
> > > in C++ but in QML I have to pass it through variant. Do you think that 
> > > it's possible? Thanks
> > 
> > Sure. Did you try it, what problem were you running into?
> 
> No, I didn't try it because I didn't know how to use my own widget in applet
> settings. 

Ok, it "just works" for me, if it doesn't for you, let us know.
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Plasma-devel mailing list