Hi,<br><br>I am beginning to learn PyQt, I am sorry if this is a bit newbie question but I can't make QIcon work.<br><br>For example in here;<br><br><div style="margin-left: 40px;">#!/usr/bin/python<br><br># menubar.py<br>
<br>import sys<br>from PyQt4 import QtGui, QtCore<br><br>class MainWindow(QtGui.QMainWindow):<br> def __init__(self):<br> QtGui.QMainWindow.__init__(self)<br> <br> self.resize(250,150)<br> self.setWindowTitle('menubar')<br>
<br> exit = QtGui.QAction(QtGui.QIcon('icons/no.png'),'Exit',self)<br> exit.setShortcut('Ctrl+Q')<br> exit.setStatusTip('Exit application')<br> self.connect(exit,QtCore.SIGNAL('triggered()'),QtCore.SLOT('close()'))<br>
<br> <br> self.statusBar()<br> <br> menubar = self.menuBar()<br> file = menubar.addMenu('&File')<br> file.addAction(exit)<br><br>app = QtGui.QApplication(sys.argv)<br>
main = MainWindow()<br>main.show()<br>sys.exit(app.exec_())<br><br></div>My icon doesn't show up at the menu. And I am not getting any error messages from the console. My icon file is 12x12 png file. Does it supposed to be something else maybe?<br>