Hello,
I'm trying to modify default selection behaviour in qgraphicsscene. I'd like to have an event propagation: if a mouse clic occurs on the topmost item, it should be sent to every item under the topmost one.

I try different solutions but can't get it work. Here is my last try in a class derived from QGraphicsScene:

Qt Code:
  1. bool myScene::event(QEvent *event)
  2. {
  3. if ( event->type() == QEvent::GraphicsSceneMousePress ) {
  4. me->setModifiers(Qt::ControlModifier);
  5. for ( int i = 0; i < items(me->scenePos()).count(); i++ ){
  6. items(me->scenePos()).at(i)->setFocus(Qt::MouseFocusReason);
  7. mousePressEvent(me);
  8. }
  9. return false;
  10. }
  11. QGraphicsScene::event(event);
  12. return true;
  13. }
To copy to clipboard, switch view to plain text mode 

Thanks for any help