[PyQt] pyuic4 generates invalid code

David Aguilar davvid at gmail.com
Fri Dec 26 09:57:30 GMT 2008


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.


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'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.


Thanks and happy holidays,

-- 
    David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.ui
Type: application/x-designer
Size: 28225 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20081226/5d1ccd10/main-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.py
Type: text/x-python
Size: 37447 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20081226/5d1ccd10/main-0001.py


More information about the PyQt mailing list