[PyQt] PyQt4.4 - Exporting .ui to .py problems with QIcon

Gustavo A. Díaz gustavo.diaz at gmail.com
Tue May 20 20:06:38 BST 2008


Well.. seems still does not work. Today i have time to test this and i have:

Traceback (most recent call last):
  File "OpenCoffee.py", line 59, in <module>
  mainApp = OpenCoffee()
  File "MainApp.py", line 84, in __init__
  self.setupUi(self)
  File
"/home/gustavo/Documentos/Desarrollo/OpenCoffee/trunk/opencoffee-server/gui/ui_main.py",
line 19, in setupUi

icon.addPixmap(QtGui.QPixmap(":/Icons/icons/windowIcon.svg",QtGui.QIcon.Normal,QtGui.QIcon.Off))
TypeError: argument 2 of QPixmap() has an invalid type

ui_main.py is the exported .ui.


Cheers.

2008/5/19, Phil Thompson <phil at riverbankcomputing.com>:
>
> On Monday 19 May 2008 14:56:52 Gustavo A. Díaz wrote:
> > Nice, now it works...
> >
> > I saw that now does not use anymore setIcon(QtGui.QIcon...), instead it
> > uses addPixmap(QtGui.QPixmap....). Is that normal? Maybe is stupid
> > question... but is how now an icon is being added in this version of Qt?
>
>
> Easy enough to find out by running uic on the same .ui file...
>
>
> Phil
>



-- 
Gustavo A. Díaz
GDNet Projects
www.gdnet.com.ar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080520/327bb415/attachment.html


More information about the PyQt mailing list