[PyQt] pyuic4 generates invalid code

Phil Thompson phil at riverbankcomputing.com
Fri Jan 16 15:18:01 GMT 2009


On Fri, 26 Dec 2008 01:57:30 -0800, "David Aguilar" <davvid at gmail.com>
wrote:
> Sorry that my first post to this list is a bug report =/
> 
> 
> I've attached a .ui file that is generating some bad code.
> 
> My main platform is debian/testing where pyuic4 --version reports:
> Python User Interface Compiler 4.4.2 for Qt version 4.4.0
> 
> This version of pyuic4 works just fine and does not have any problems.
> 
> 
> 
> I'm testing stuff out on windows (under virtualbox).
> 
> I've tried both python2.5 and python2.6 and the corresponding
> pyqt4.4.3, pyqt4.4.4 releases.  They both have this issue.  I'm using
> the latest windows binary installers from the pyqt website.
> 
> Issue #1:
> The code generates calls to setSortingEnabled(), which does not exist.
> 
> Issue #2:
> The __sortingEnabled variable is being used before it is defined.  You
> can see that in the 'main.py' file I've attached.
> 
> To reproduce it simply run:
>     pyuic4 main.ui
> 
> Search for __sortingEnabled in the generated file.

This is fixed in tonight's snapshot.

> In related news.. I've had reports from some users whose pyuic4 file
> is missing the #!/bin/sh shebang line at the top of the script.  Is
> that a packaging issue or is it something that can be fixed upstream?

I think it's probably an issue with an older version.

> I'm reporting these on behalf of users who have run into some issues
> while trying to build:
>     http://cola.tuxfamily.org/
> 
> It's open source so the code is easily reviewable.
> 
> Any help is greatly appreciated.

Phil


More information about the PyQt mailing list