Hi guys, I think I found a bug in pyuic4:

When adding icons inside a QComboBox (using designer-qt4) and I convert to python using pyuc4, i get this in my main_ui.py , I'm using the latest snapshot code. PyQt-x11-gpl-4.4.3-snapshot-20080612

from PyQt4 import QtCore, QtGui

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
          .......
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/images/sites/opensubtitles.ico"), QtGui.QIcon.Normal, QtGui.QIcon.On)
       ...
    def retranslateUi(self, MainWindow):
       ....
        self.comboBox.addItem(icon2, QtGui.QApplication.translate("MainWindow", "OpenSubtitles.org", None, QtGui.QApplication.UnicodeUTF8))
    ....

This means that the icon2 variable dies when the setupUI method finishes so it cannot be found inside of retranslateUI method.

Attached is the .ui file

Best Regards and thanks.

Attachment: main.ui
Description: application/designer

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to