I'm implementing a QGraphicsItem class. I would like the user to right-click over an object of this class and interact with a context menu, selecting an item that the object will then use to adjust it's iternal state.

Getting the menu to popup is simple, but I'm not sure how to make use of it. I could inherit from QObject and simply implement signals and slots, but there is a potential for a few tens of thousands of these objects to exist at any given time, and QObject is pretty heavy.

The documentation for QGraphicsItem trails off just after menu setup, without actually providing a solution to this problem.

I'll be calling exec() to show the menu synchronously. Should I just examine the menu contents upon return, or use a QActionGroup in a similar fashion? Or is there a better way to do this?