[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] AttributeError: sipThis
From: Phil Thompson <phil () river-bank ! demon ! co ! uk>
Date: 2002-06-28 9:02:34
[Download RAW message or body]
Stephen Green wrote:
> I get the following error when I'm trying to run the constructor of
> QCanvasSprite from __setstate__() in my subclass. I'm trying to use
> pickle to save the class, so since Qt classes can't be pickled, I'm
> using __getstate__() and __setstate__().
>
>
> File "/usr/lib/python2.2/pickle.py", line 592, in load
> dispatch[key](self)
> File "/usr/lib/python2.2/pickle.py", line 943, in load_build
> setstate(value)
> File "CanvasPoint.py", line 179, in __setstate__
> QCanvasSprite.__init__(self, self.pixmapArray, canvas)
> File "/usr/lib/python2.2/site-packages/qtcanvas.py", line 79, in __init__
> libqtcanvasc.sipCallCtor(7,self,args)
> AttributeError: sipThis
>
>
> Does anybody know how this may be caused?
The usual cause is that you have a sub-class of a Qt class but haven't
called the __init__ ctor of the Qt class in your sub-class's __init__ ctor.
Phil
_______________________________________________
PyKDE mailing list PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic