Having no choice but to find the difficult answer to my question, here is what I did:
- searched for the definition of mousePressEvent in QGraphicsSvgItem.cpp. Not found.
- searched for the definition of mousePressEvent in QGraphicsItem.cpp (ancestor of QGraphicsSvgItem). The method exists, but no corresponding action was found there.
- searched for mousePressEvent calls in QGraphicsItem.cpp. Found myself reading the code QGraphicsItem :: sceneEvent (), the mouse event dispatcher for the Qt graphics scene. It seems that there are no differences in the different zones of the graphic elements.
Therefore, the sad answer is: Qt does not allow this behavior.
source share