[PyKDE] pyuic + images + listItems

Petr Vaněk petr.vanek at ika.cz
Sat Apr 12 15:21:00 BST 2003


hello.

I've got this problem after calling pyuic on UI xml file:

---BOF---
...
image0_data = blahblah...

class Blah(blahblah...):

    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

        image0 = QPixmap(image0_data)

    def languageChange(self):
	...
        self.listBox.insertItem(image0,self.tr("Common"))
...
---EOF--

But python scream (logically :D) about "NameError: global name 'image0' is not
defined" in languageChange method.
Is it pyuic bug or did I something wrong? (writing self.image0 after each
pyuicing isn't comfortable :))

best regards

-- 
Petr Vanek --------------
petr.vanek [at] ika [dot] cz
www.yarpen.cz ----------------
Kuolema Kaikille (Paitsi Meille)

Today is good day to end it all




More information about the PyQt mailing list