[PyKDE] Crash when using QAction.setShortcut

Andreas Pakulat apaku at gmx.de
Tue Mar 6 00:12:52 GMT 2007


On 06.03.07 00:09:05, Miguel Lobo wrote:
> The following simple code crashes for me:
> 
> >from PyQt4 import QtCore, QtGui
> >from PyQt4.QtCore import Qt
> 
> action = QtGui.QAction(None)
> action.setShortcut(QtGui.QKeySequence(Qt.Key_Q))
> 
> I'm using:
> 
> * Qt/Windows 4.2.2 Open Source Edition.
> * PyQt 4.1.1
> * sip 4.5.2

You're missing a QApplication object.

Andreas 

-- 
You have been selected for a secret mission.




More information about the PyQt mailing list