[PyKDE] pyuic does not correctly translate QListView pixmaps

Tuvi, Selim stuvi at SLAC.Stanford.EDU
Fri Feb 7 23:34:00 GMT 2003


 Hi, I'd like to report a problem that we are encountering in PyQt 3.5 Commercial. If in Qt Designer we add a QListView and define a pixmap for one or more of the items in the QListView, pyuic does not translate this correctly and gives the following error when we run the resulting source:

Traceback (most recent call last):
  File "form1.py", line 200, in ?
    w = Form1()
  File "form1.py", line 183, in __init__
    self.languageChange()
  File "form1.py", line 193, in languageChange
    item.setPixmap(0,image0)
NameError: global name 'image0' is not defined

What's happening is that image0 is defined as a local variable in __init__ so languageChange() doesn't know about it.

We got around it by adding the pixmaps in our implementation code but I thought I mention this for future releases.

Thanks
-Selim





-------------- next part --------------
A non-text attachment was scrubbed...
Name: form1.ui
Type: application/octet-stream
Size: 3998 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20030207/3b7d0168/form1.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: form1.py
Type: application/octet-stream
Size: 4366 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20030207/3b7d0168/form1-0001.obj


More information about the PyQt mailing list