Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.7.1, 5.15.9
-
None
-
Debian, GCC 6.2.1, Qt 5.7.1
Description
The attached example program paints a red background in the left upper corner. On left mouse click it paints a white rectangle with a shadow. On right click the white rectangle disappears.
Sometimes a right click leads to segfault.
A possible workaround seems to be to call `prepareGeometryChange()` on the `QGraphicsItem` that has the `QGraphicsEffect` before removing that item from the scene.
See also here: https://forum.qt.io/topic/75510/deleting-qgraphicsitem-with-qgraphicseffect-leads-to-segfault/13
Edit: The problem does only appear if the item with `QGraphicsEffect` is removed (`QGraphicsScene::removeItem()`) before it is deleted. If the item is simply deleted (which implies removal from the scene) but without the explicit call to QGraphicsScene::removeItem() before, the segfault does not occur.
I believe this could make it relatively easy to identify the cause of the problem.