[Kde-bindings] Re: Plasma.ToolTipManager and Plasma.Applet
Thomas Olsen
tanghus at gmail.com
Tue Oct 19 09:26:55 UTC 2010
On Thursday 14 October 2010 16:12:03 Thomas Olsen wrote:
> On Thursday 14 October 2010 14:53:50 Luca Beltrame wrote:
> > In data giovedì 14 ottobre 2010 13:17:35, Thomas Olsen ha scritto:
> > > Plasma.ToolTipManager.self().setContent(self, data)
> >
> > As far as I can remember, you need to use "self.applet" instead of "self"
> > when applying something to the applet. I'm not sure it will work, but
worth trying.
> >
> > Plasma.ToolTipManager.self().setContent(self.applet, data)
> >
> > I think someone stumbled upon this on IRC a while ago and I helped him
> > out: from memory, this was the suggestion.
>
> You were clear enough :-) And it - kind of - worked as in the tooltip gets
> registered but the popup doesn't show. I can see that the
> Plasma::PopupApplet::toolTipAboutToShow() method is called but nothing
> happens. As far as I can see from the docs and the behavior of other
> Plasmoids it is not mandatory to implement but perhaps it is in Python
> Plasmoids. I will have to tinker a bit with it but thanks a lot for
> leading me in the right direction. Should have thought of it myself but
> isn't it always like that? ;-)
>
> BTW: I also tried to add:
>
> Plasma.ToolTipManager.self().registerWidget(self.applet)
>
> but it didn't make any difference - as it shouldn't AFAICT.
As mentioned above this works as far as it runs but doesn't show any tool tip.
But I think that by using 'self.applet' it registers the
PyKDE4.plasma.PopupApplet instead of the
applet_pypopupapplet.main.PyPopupApplet which is a subclass of Python
PopupApplet.
I tried to implement toolTipAboutToShow to see if it was called but it wasn't.
Instead was called:
@pyqtSlot(name="toolTipAboutToShow")
def toolTipAboutToShow(self):
print "PyPopupApplet:toolTipAboutToShow"
From ~/.xsession-errors:
QMetaObject::invokeMethod: No such method SpellCheck::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method SpellCheck::toolTipHidden()
QMetaObject::invokeMethod: No such method
Plasma::PopupApplet::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method Plasma::PopupApplet::toolTipHidden()
As you can see the SpellCheck Applet toolTipAboutToShow is called but for the
derived Python applet the Plasma::PopupApplet::toolTipAboutToShow is called.
I have no idea about the inner workings of the bindings (it's dark magic to
me) but to me this indicates that that - well - something isn't working the
way it's supposed to...
I'm cross posting again as I really don't know if I should file a bug report
and if so against which package.
--
Best regards / med venlig hilsen
Thomas Olsen
Dropbox and my thumb drive had an epic battle. Dropbox won.
http://db.tt/T0p6d6L
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20101019/5063ad48/attachment.sig>
More information about the Kde-bindings
mailing list