title: QObject not finding Signal in custom class
body: <p>I'm trying to get my MyGraphicsRectItem (which is a subclass of QGraphicsRectItem and QObject) turn a slightly different color when I hover over it, so I've created a signal in the header file:</p>
  
  <pre><code>class MyGraphicsRectItem : public QObject, public QGraphicsRectItem
  {
      Q_OBJECT
      ...
  signals:
       void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
  }
  </code></pre>
  
  <p>In my MyMainWindow, I'm connecting the hoverEnterEvent in this way (edit, clarification: a1 is a MyGraphicsRectItem):</p>
  
  <pre><code>connect(a1, &amp;MyGraphicsRectItem::hoverEnterEvent, [this, i](QGraphicsSceneHoverEvent *event) {
              hoverRect(event, i);
  });
  </code></pre>
  
  <p>Unfortunately, I get a <code>QObject::connect: signal not found in MyGraphicsRectItem</code> error message even though I clearly defined it in the header file. Any ideas?</p>