Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
5.5.1
-
Windows7
MinGW 4.9.2 32bit
CMake-Ninja
Description
Deleting a QGraphicsItem that contains a QGraphicsProxyWidget having focus seems to cause the application to crash.
In the example attached, I launch the application with a simple QMainWindow containing a QGraphicsView and a QGraphicsScene.
In the scene, I have only one top-level item which is a QGraphicsItemGroup.
This QGraphicsItemGroup item contains a QGraphicsProxyWidget item, which embeds a QTableWidget (a 2x2 table containing "x" strings).
Using an action in the menu bar of the main window, I delete the QGraphicsItemGroup item.
1) if the QGraphicsProxyWidget did not have focus, the deletion happen gracefully and the application does not crash.
2) if the QGraphicsProxyWidget have focus (e.g. I clicked on it before clicking on the menu action), the application crashes. I am not using QT sources at the moment so I have only a limited amount of debug info, but it seems related with the findFocusChild method of the QGraphicsProxyWidget, which calls isEnabled() on a child that maybe does not exit ?