On Wednesday, 18. February 2009 17:51:45 Ricardo wrote: > Hi All, Hi...
> I'm writing a small plasma applet with Python, i try to display a
> tooltip when the mouse passes over the plasmoid, i tried with this
> code:
>
> Plasma.ToolTipManager.registerWidget(self)
> self.toolTipData=Plasma.ToolTipContent()
> self.toolTipData.mainText=("prueba")
> self.toolTipData.subText=("eoooo 1")
> Plasma.ToolTipManager.setContent(self,self.toolTipData)
>
> but it didn't work, it says:
>
> Plasma.ToolTipManager.registerWidget(self)
> TypeError: first argument of unbound method
> ToolTipManager.registerWidget() must be a ToolTipManager instance
>
> any ideas?
I stumbled about that, too ;)
You've to get the Instance ofthe ToolTipManager first, with
Plasma.ToolTipManager.self() :
Plasma.ToolTipManager.self().registerWidget(self)
self.toolTipData=Plasma.ToolTipContent()
self.toolTipData.mainText=("prueba")
self.toolTipData.subText=("eoooo 1")
Plasma.ToolTipManager.self().setContent(self,self.toolTipData)
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
