[PyQt] another pyuic4 icon bug
    Phil Thompson 
    phil at riverbankcomputing.com
       
    Fri Jun 20 23:03:18 BST 2008
    
    
  
On Tue, 17 Jun 2008 17:16:56 +0800, Iván García <capiscuas at gmail.com>
wrote:
>      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.
Should be fixed in tonight's snapshot.
Thanks,
Phil
    
    
More information about the PyQt
mailing list