[PyKDE] invalid type for QSizePolicy()

Phil Thompson phil at riverbankcomputing.co.uk
Tue Aug 23 18:08:04 BST 2005


On Tuesday 23 August 2005 5:55 pm, Bruno Castro da Silva wrote:
> Hi all,
>
> I recently installed Kubuntu and I'm facing some problems when I try
> to run one of my pyqt projects, which I started on a Fedora distro.
> When I try to run it, the following error occurs:
>
> TypeError: argument 1 of QSizePolicy() has an invalid type.
>
>
> I am aware that this error has been discussed here before, but I can't
> seem to solve the problem. I'm using Qt 3.3.3, KDE 3.4.0 and pyuic
> 3.13 for Qt version 3.3.3.
>
> I tried to regenerate the py file using pyuic but it didn't solve. In
> fact, I started a dummy application from scratch to see if the problem
> was in some weirdness in my .ui, but it wasn't.
>
> Can anyone give me a hint on how to solve this? I googled around and
> found a web site for some random app which says that the solution is
> to comment the lines which are causing the errors. Of course I can't
> do that :-)

I'm guessing your PyQt has been built with SIP v4.2 (or later) which triggers 
a bug in pyuic 3.13 (and earlier). You need to upgrade your PyQt - then 
re-run pyuic on your .ui files.

Phil




More information about the PyQt mailing list