Technical Advise for PlasmaQuick::ContainmentView [Latte]

Marco Martin notmart at gmail.com
Mon Jul 1 11:10:56 BST 2019


On Thu, Jun 20, 2019 at 11:15 AM Michail Vourlakos <mvourlakos at gmail.com> wrote:
>
> Hello everyone,
>
> I need some help, Latte::Indicators (https://store.kde.org/browse/cat/563/) are standalone qml only packages like plasma applets which are loaded in order to show Tasks indication/information
>
> My issue is that when an indicator's qml code is updated I would like the user to notice the update runtime in Latte Dock/Panels. Latte is using "Plasma::ContainmentView" for docks and panels which derives from "KQuickAddons::QuickViewSharedEngine". Searching the Internet for QQuickView a solutions is to do:
>
> setSouce(QUrl));
> engine()->clearComponentCache();
> setSource(corona()->kPackage().filePath("lattedockui"));
>
> but that does not work, it just destroys QQmlComponent of ContainmentView,
>
> Do you have any ideas?

this will reload the source of the view, which is just the tiny qml
file from the shell poackage..
so, you need to actually reload the whole containment i guess.

in order to do that i guess some new api is needed in AppletQuickItem
in libplasmaquick
a reload() method (callable only from c++, not qml) that would do the
same with the internal qmlobject (which is kindof the api of
qquickview, but without a window) to itself and all eventual applet
children (in case it's a containment)
Would you be interested looking into that?

--
Marco Martin


More information about the Plasma-devel mailing list