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

Phil Thompson phil at riverbankcomputing.com
Fri May 16 17:25:36 BST 2008


On Friday 16 May 2008 17:18:55 Gustavo A. Díaz wrote:
> Hi guys!
>
> There is a problem when i export the .ui file to .py (which never happened
> before). Using Designer i've set an icon to a button.
> The exported file does not include the path of the icon/resource having
> this as result:
>
> self.applyButton = QtGui.QPushButton(self.centralwidget)
> self.applyButton.setGeometry(QtCore.QRect(722,584,90,26))
> self.applyButton.setFocusPolicy(QtCore.Qt.StrongFocus)
> self.applyButton.setIcon(QtGui.QIcon("""
> """))
>
> A bug in PyQt? cause only happens with QIcon, in the case of setting a
> pixmaps, there is no problem in the exported file:
>
>         self.emptyPagePixmap = QtGui.QLabel(self.emptyPage)
>         self.emptyPagePixmap.setGeometry(QtCore.QRect(10,52,150,128))
>
> self.emptyPagePixmap.setPixmap(QtGui.QPixmap(":/Pixmaps/pixmaps/emptyPage.p
>ng"))
>
> Any tip? Cheers.

http://www.riverbankcomputing.com/support/help

Phil



More information about the PyQt mailing list