Hi everybody!

I have class CLVideoWindow inherited from QGraphicsItem.
I want to handle focusInEvent event and mousePressEvent.
I've reimplemented

Qt Code:
  1. void CLVideoWindow::focusInEvent( QFocusEvent * event )
  2. {
  3. QGraphicsItem::focusInEvent(event);
  4.  
  5. }
  6.  
  7.  
  8. void CLVideoWindow::mousePressEvent ( QGraphicsSceneMouseEvent * event )
  9. {
  10. QGraphicsItem::mousePressEvent(event);
  11. }
To copy to clipboard, switch view to plain text mode 


But this functions never gets called.

What am I missing ?

In CLVideoWindow constructor I do:

Qt Code:
  1. setAcceptHoverEvents(true);
  2. setFlag(QGraphicsItem::ItemIsFocusable);
  3. setAcceptedMouseButtons(Qt::MouseButton::LeftButton);
  4. setAcceptedMouseButtons(Qt::MouseButton::RightButton);
To copy to clipboard, switch view to plain text mode 


Thank you!