[PyKDE] Problem with dynamic tooltip

stsao stsao at eudoramail.com
Wed Nov 28 21:26:35 GMT 2001


Hi,

Thanks to Donovan, the problem has been resolved.   Please see his reply below.

Donavan, were you able to see the other problem (background color color of 
QMultiLineEdit not updated properly)?

Thanks again
ST

At 02:19 PM 11/25/2001 -0500, Donovan Rebbechi wrote:
>[ again, please forward to list ]
>
>If the line
>         tooltip = DynamicTip(self)
>is changed to
>         self.tooltip = DynamicTip(self)
>
>the program doesn't you posted segfault.
>
>This makes some sense when you think about the Qt C++ example code --
>notice this:
>
>// t is of type DynamicTip*
>         TellMe::~TellMe()
>         {
>                 delete t;
>                 t=0;
>         }
>
> From this, I gather:
>
>(a) t is *not* automatically managed by its parent.
>(b) hence in Python, the reference count of the variable "tooltip" drops
>to 0 when the TellMe constructor exits (because the widget itself isn't
>holding a reference to tooltip)
>
>btw, the line rect = parentWidget().tip(point) in maybeTip
>needs to be changed to self.parentWidget()...
>
>Cheers,
>--
>Donovan


Sheng-Te Tsao
Online Status: 
<http://eudora.voicecontact.com/vc3/?tst%40eudoramail.com><http://eudora.voicecontact.com/vc3/?tst%40eudoramail.com><http://www.eudora.com/products/voicecontact/>






More information about the PyQt mailing list