[PyQt] Segfault in QMenu.addAction when parent widget is deleted.

J Robert Ray jrobertray at gmail.com
Wed Apr 2 21:11:05 BST 2014


Hi all, I wanted to share this small example program that will segfault.

The newest PyQt I have been able to test it with PyQt 4.10 / Qt 4.8.4, so I
don't know if it has been fixed already.

In boils down to trying to add a new action to a submenu of a menu attached
to a widget that has been deleted. We're having this problem due to some
asynchronous RPC and getting results back after a user has caused the
widget to go away.

If anyone can try this in a newer PyQt to see if it still crashes, I would
appreciate it.

Thanks,

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140402/e90211ce/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyqtcrash.py
Type: text/x-python
Size: 530 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140402/e90211ce/attachment.py>


More information about the PyQt mailing list