Python crashes with a segmentation fault when contextMenuEvent for a QGraphicsTextItem with setTextInteractionFlags(QtCore.Qt.TextEditorInteraction) is called.
Run attached script.py and right click in the canvas.
On PySide2 18.104.22.168 and 5.15.0 this opens a context menu showing Undo, Cut, Copy, Paste etc.
On PySide2 5.151 and 5.15.2 this casues a segmentation fault.
Steps to reproduce in Qt:
- run qtbug89563.zip
- right click text item
- Patch the subattac example qtbug89563_subattac_repro.diff
- Launch, start new game. right click on top right progress text item
- Observer crash qtbug89563_subattac_stack.txt
This was reported against Qt for Python 5.15, but it does not happen in Qt for Python 6. Maybe it was fixed in Qt 6?