[PyKDE] QWidget.reparent trouble

Greg Green gregory.p.green at boeing.com
Mon May 21 22:58:50 BST 2001


> Hi all,
> 
> When trying to use ("self" being a subclass of QDialog) :
> 
> self.reparent(self.find(0), qt.QPoint(10, 10))
> 
> I get this error :
> TypeError: Argument 2 of QWidget.reparent() has an invalid type
> 
> This is working (found in the Qt documentation) :
> 
> self.reparent(self.find(0), 
>               self.getWFlags() & (~(qt.Qt.WType_Mask)), 
>               qt.QPoint(10, 10))
> 
> So, is the first version (redefinition of the second one according
to
> the Qt documentation) missing in PyQt ?

Overloaded methods don't work in PyQt right now. You have to either
change the sip source to give the method a different name and
recompile :( or figure out a different way. I had the same problem
with QWMatrix.map if you look at the archives.

-- 

Greg Green
Advanced Design Systems
Math & Computing Technology
Boeing
(425) 865-2790





More information about the PyQt mailing list