Hello all,

I have run across a difficulty that I can't seem to find a direct answer to. My application has a QwtPlot instantiated. What I want to do is set things up so that when a user right-clicks anywhere on the QwtPlot window, I will receive a mouse event, and I can determine which of QwtPlot's QwtPlotItems it was that was clicked.

If the user right clicks on the lower x axis label, for instance, I would like a mouse event and then be able to determine that it was the label that was clicked on. Getting the mouse event is no problem. I have found several ways to do that. The sender, though, seems to be a little more difficult. I can retrieve a QWidget * using childAt, but then I have not been able to find a way to determine what kind of object it was that dispatched the signal. Was it the QLabel on the bottom x axis, the axis markers on the left y axis, etc. When I debug and look at the information that I receive (i.e. what information is visible in the debugger regarding the particular object), the objectName is always blank, so that doesn't help me. It also appears that all of the messages come from either the QwtPlot itself or the QwtPlotCanvas, depending on which method I use.

I've tried subclassing my QwtPlot and overriding the mousePressEvent, but thus far I seem to be unable to determine who exactly was clicked on.

Anyone have any ideas to steer me in the right direction?