title: Catch mouse event when clicked on the axis of a qchart diagram
body: <p>I'm programming an app. in QT c++ and have the following question:
  Is it possible to catch a mouse event when clicked on the axes(not in the diagram itself) of the qchart diagram?</p>
  
  <p>I have tried to overwrite the event method of the axes instance, but the event method is not called..</p>
  
  <p>I also tried to solve the problem with an eventfilter on the QChart instance, the eventfilter works so far. But how to distinguish the mouseclick between the Axis and Qchart area itself?</p>
  
  <pre><code>//Mouse filter Object:
  MousePressEater::MousePressEater(Axes* ax)
  {
      this-&gt;axis = ax;
  }
  
  bool MousePressEater::eventFilter(QObject *obj, QEvent *event)
  {
      //qDebug() &lt;&lt; event-&gt;type();
      if (event-&gt;type() == QEvent::UngrabMouse) {
          QMouseEvent *mEvent = static_cast&lt;QMouseEvent *&gt;(event);
          qDebug("Ate mouse press %d %d %d %d", mEvent-&gt;pos().x() , mEvent-&gt;pos().y() , axis , obj );
          return true;
      } else {
          // standard event processing
          return QObject::eventFilter(obj, event);
      }
  }
  
  
  //Installing the filter in the constructor(inherited from QChart):
  MousePressEater *mPressEater = new MousePressEater(ax);
  this-&gt;installEventFilter(mPressEater);
  </code></pre>
  
  <p>"obj" just gives back a pointer to the QChart instance if clicked on the axis.</p>
  
  <p>Anybody has a solution for this problem?
  Thanks!</p>