[PyKDE] Porting Tux

Phil Thompson phil at riverbankcomputing.co.uk
Wed Nov 3 08:17:14 GMT 2004

On Tuesday 02 November 2004 11:45 pm, Dennis Schaaf wrote:
> The way I understand it "self" is the MoveMe object, which is a
> QWidget, why doesn't that work as an instance for the first argument?
> I put this
> def __init__(self, name, args):
>   apply(QWidget.__init__, (self,None, None, args))
> which resolved that error, but now I get an error that tells me that
> setBackgroundPixmap does not exist when I call it

"self" is the Python equivalent of C++'s "this". In C++, "this" is an implicit 
argument, not an explicit one.

The first explicit argument to the QWidget ctor is the (optional) QWidget 
instance of the parent - not self/this.


More information about the PyQt mailing list