[PyKDE] Porting Tux
phil at riverbankcomputing.co.uk
Tue Nov 2 20:51:27 GMT 2004
On Tuesday 02 November 2004 4:46 pm, Dennis Schaaf wrote:
> Just for experimentation purposes, I'm porting the tux (
>.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
More information about the PyQt