Plasmoid plugin signal handling

Rastislav Marko cdfghglz at gmail.com
Wed Jun 14 08:39:04 UTC 2017


Thank you for the hints, I made the semantics more meaningful (in fact I have another 
class named ActiivtyJumper).

On utorok, 13. júna 2017 16:49:26 CEST Sebastian Kügler wrote:
> 
> The signal isn't defined in "Item", you need to create a DBusObject object
> in your QML code, then you can add a signal handler.

I can not really find a reference to DBusObject, what should it represent?

> > ---------- main.qml
> > 
> > Item {
> > 
> >     id: main
> >     
> >     ActivityJumper {
> >     
> >         id: activityJumper
> 
> Here, it'll be found:
> 
> 	 		onSignalDesktopChanged: print("desktop 
changed!")
> 

I tried this before, but I was appearently missing a proper import (import 
org.kde.private.activityjumper 1.0) in the main.qml. Then I tried to use the Connections as a 
workaround. With the import the handler works from the object instance in main.qml like 
charm.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170614/45338111/attachment-0001.html>


More information about the Plasma-devel mailing list