Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

PyQt4 graphics : contextMenu does not appear if graphics item is not movable...



  • In a QGraphicsScene, i first select some graphics item, say myitem, then I right-click on it the

    scene().contextMenuEvent(self,event)
    

    is called, and show the context menu i build there. All is right.

    I execute this instruction :

    myitem.setFlag(ItemIsMovable, False)
    

    Now i right-click on (selected) myitem and context menu does not appear anymore...
    Maybe I should show a complete program having this behaviour ?