[PyQt] Segmentation fault in keyPressEvent

Mads Ipsen mpi at comxnet.dk
Thu Sep 17 20:45:41 BST 2009


The following script triggers a segmentation fault:

import sys
from PyQt4 import QtGui

if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)

    widget = QtGui.QWidget()
    widget.show()
    widget.keyPressEvent(None)

    sys.exit(app.exec_())

I believe it should generate an error.

Sys info:

Ubuntu 8.04
Qt 4.5.2
PyQt 4.5.4




-- 
+------------------------------------------------------------+
| Mads Ipsen, Scientific developer                           |
+------------------------------+-----------------------------+
| QuantumWise A/S              | phone:         +45-29716388 |
| Nørresøgade 27A              | www:    www.quantumwise.com |
| DK-1370 Copenhagen, Denmark  | email:  mpi at quantumwise.com |
+------------------------------+-----------------------------+




More information about the PyQt mailing list