<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">On Wednesday, 18. February 2009 17:51:45 Ricardo wrote:<br>
&gt; Hi All,<br>
Hi...<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>&gt; I'm writing a small plasma applet with Python, i try to display a<br>
&gt; tooltip when the mouse passes over the plasmoid, i tried with this<br>
&gt; code:<br>
&gt;<br>
&gt;         Plasma.ToolTipManager.registerWidget(self)<br>
&gt;         self.toolTipData=Plasma.ToolTipContent()<br>
&gt;         self.toolTipData.mainText=("prueba")<br>
&gt;         self.toolTipData.subText=("eoooo 1")<br>
&gt;         Plasma.ToolTipManager.setContent(self,self.toolTipData)<br>
&gt;<br>
&gt; but it didn't work, it says:<br>
&gt;<br>
&gt;    Plasma.ToolTipManager.registerWidget(self)<br>
&gt; TypeError: first argument of unbound method<br>
&gt; ToolTipManager.registerWidget() must be a ToolTipManager instance<br>
&gt;<br>
&gt; any ideas?<br>
I stumbled about that, too ;)<br>
You've to get the Instance ofthe ToolTipManager first, with <span style=" font-style:italic;">Plasma.ToolTipManager.self()</span> :<br>
        Plasma.ToolTipManager.<span style=" font-weight:600;">self().</span>registerWidget(self)<br>
        self.toolTipData=Plasma.ToolTipContent()<br>
        self.toolTipData.mainText=("prueba")<br>
        self.toolTipData.subText=("eoooo 1")<br>
        Plasma.ToolTipManager.<span style=" font-weight:600;">self().</span>setContent(self,self.toolTipData)</p></body></html>