[PyKDE] SIP snapshot issue

Wido Depping wido.depping at gmail.com
Tue Feb 1 10:39:36 GMT 2005

On Mon, 6 Dec 2004 17:14:28 +0100, Fredrik Juhlin <laz at strakt.com> wrote:
> Trying to use the latest SIP snapshot I ran into trouble with some
> pyuic-generated code. It seems that it will at times generate code such as:
>         self.TextLabel2.setSizePolicy(QSizePolicy(0,5,0,0,self.TextLabel2.sizePolicy().hasHeightForWidth()))
> which results in the error:
> TypeError: too many arguments to QSizePolicy(), 0 at most expected
> My wild guess was that this is an effect of the new typedef code that is
> mentioned in the changelog. I tried using the latest PyQt snapshot to see if
> that sorted things out, but it didn't.

I just wanted to note that I got the same error report from Carsten
Lohrke, who encountered this error in my application Luma (
http://luma.sf.net ). The files generated by pyuic use integers
instead of QSizePolicy::SizeType, which seems to trigger the error in
the snapshot. All releases up to 3.13 don't have this problem.
Qt designer doesn't use QSizePolicy::SizeType in its .ui files,
instead it uses integers. So either pyuic has to be fixed or Trolltech
intends that QSizePolicy::SizeType can be mapped to an integer.

Wido Depping
ICQ: 51303067    AIM: wido3379
Jabber: wido at jabber.ccc.de
Blog: http://widoww.blogspot.com

More information about the PyQt mailing list