Moving widget via plasmascripts (Javascript)

CPA van Run C.P.A.vanrun at uu.nl
Thu Nov 17 08:22:27 UTC 2016


Dear all,

I am having some difficulty with editing geometries of plasmoids/widgets.
After adding a widget, changes to the widget's *geometry* attribute are
ignored:
*var folderview_network =
desktopsArray[j].addWidget('org.kde.plasma.folder');*
*folderview_network.geometry = new QRectF(0,0,700,700);*

I noticed that the original *geometry* attribute is not instantiated in a
valid manner (yet?):
print(*folderview_network.geometry.valid) => false*

Does anyone have any advice on changing a widget's geometry from
Javascript? The crux is that it needs to be done for every user, on
multiple systems. Hence I opted for using the Javascript-based plasmashell
scrips (i.e. as found in
[..]/plasma/shells/org.kde.plasma.desktop/contents/layout.js ). The context
is Kubuntu 16.04 (Plasma 5.5.5).

Thank you!
chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161117/40306f61/attachment.html>


More information about the Plasma-devel mailing list