3

I have more QGraphicsItems on top of each other. How can I make hover event available for all items? Only the last added item (the one on the top) accepts hover events.

Thanks

1
  • How can you move your mouse on an item which is covered by another one ? Commented Aug 24, 2011 at 16:51

1 Answer 1

3

You could simulate those events, you "just" have to:

  • reimplement mouseMoveEvent in a QGraphicsView or QGraphicsScene derived class,
  • use QGraphicsView::items(QPointF) get the item list below the mouse
  • create and send events, with QGraphicsScene::sendEvent whenever an item is added or removed from the list for all items but the one at the top of the stack (which is already handled).
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.