On Tuesday 02 November 2004 4:46 pm, Dennis Schaaf wrote: > Hi, > > Just for experimentation purposes, I'm porting the tux ( > http://webcvs.kde.org/cgi-bin/cvsweb.cgi/qt-copy/examples/tux/tux.cpp?rev=1 >.2) program over to python. > > The problem I have when doing this though is that QWidget will not > take the last argument I give it. In the original project, the first > argument is the object itself, then secon is the name (a char) and > lastly an integer (int) > > In my code I have the same thing: > class MoveMe(QWidget): > def __init__(self, name, args): > apply(QWidget.__init__, (self, name, args)) > > but I get > "apply(QWidget.__init__, (self, name, args)) > TypeError: argument 1 of QWidget() has an invalid type" > > whenever i try to execute it. > > do you guys know how to call this function properly, so that I can > still pass the right arguments along?
The QWidget ctor needs a QWidget instance as it's first argument - see the Qt docs. Phil _______________________________________________ PyKDE mailing list [EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
