I have a QGraphicsView containing a custom QGraphicsTextItem. The QGraphicsTextItem has a double-click event:

Qt Code:
  1. void myQGraphicsTextItemClass::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *evt)
  2. {
  3. MGlobal::displayInfo(MQtUtil::toMString(QString().sprintf("Double click on textId")));
  4.  
  5. QGraphicsTextItem::mouseDoubleClickEvent(evt);
  6. }
To copy to clipboard, switch view to plain text mode 
What goes well:
When I double click in the QGraphicsView but not in the QGraphicsTextItem, then nothing happens, which is normal. When I double click directly on the QGraphicsTextItem, then I get a "Double click on textId" message, as expected.

What goes wrong:
However when I then double click again wherever on my main QGraphicsView but not in the QGraphicsTextItem, then I always get the above message.

Question:
How come the QGraphicsTextItem keeps getting the mouseDoubleClickEvent events even if I am not directly clicking on it ?

My QGraphicsTextItem is created this way from the QGraphicsView constructor:

Qt Code:
  1. oneTextNode=new myQGraphicsTextItemClass();
  2. scene()->addItem(oneTextNode);
To copy to clipboard, switch view to plain text mode 
and my QGraphicsTextItem class looks like:

Qt Code:
  1. class myQGraphicsTextItemClass : public QGraphicsTextItem
  2. {
  3. Q_OBJECT
  4. public:
  5. myQGraphicsTextItemClass(QGraphicsItem *parent=0);
  6. virtual ~myQGraphicsTextItemClass() {};
  7. protected:
  8. virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *evt);
  9. };
To copy to clipboard, switch view to plain text mode 
and its constructor:

Qt Code:
  1. myQGraphicsTextItemClass::myQGraphicsTextItemClass(QGraphicsItem *parent) : QGraphicsTextItem ( parent )
  2. {
  3. setPlainText("Hello");
  4. setTextInteractionFlags(Qt::TextEditorInteraction);
  5. }
To copy to clipboard, switch view to plain text mode 
Thanks.