[PyQt] Custom QAction with python 2.6

Iliya Gogolev iliya at realdice.com
Sun Jan 25 16:38:17 GMT 2009


I wrote an application in python 2.5 & PyQt-Py2.5-gpl-4.4.3-1. When I
installed Python 2.6  & PyQt-Py2.6-gpl-4.4.4-2 the custom QAction-s don't
work anymore. For example in MenuBar:

 

 

self.m_exitAction = QtGui.QAction(self)

self.m_exitAction.setText(QtGui.QApplication.translate("MainWindow",
"E&xit", None, QtGui.QApplication.UnicodeUTF8))

                self.m_exitAction.setShortcut("Alt+X")

                QtCore.QObject.connect(self.m_exitAction,
QtCore.SIGNAL("activated()"), self.close)

 

self.m_menuBar = QtGui.QMenuBar(self)

                        

self.m_menuFile = QtGui.QMenu(self.m_menuBar)

                self.m_menuFile.setTitle("&File")

                self.m_menuFile.addAction(self.m_exitAction)        

self.m_menuBar.addAction(self.m_menuFile.menuAction())

 

self.setMenuBar(self.m_menuBar)

 

 

Any ideas?

Thanks

 

 

Best Regards,

Iliya Gogolev

 


Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.552 / Virus Database: 270.10.9/1900 - Release Date: 1/18/2009
12:11 PM
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090125/b5d677ca/attachment.html


More information about the PyQt mailing list