PDA

View Full Version : QGraphicsScene intersection problem



Alundra
17th October 2013, 01:08
Hi all,
I have a QGraphicsItem who contains 2 children on the border (a circle for each child).
When I use the function "items" the cursor needs to be on the parent to have children on the list but the circle is a bit outside the parent item.
That cause problem that if you click on the circle part who is outside, "items" doesn't add it in the list.
What is the good method to have all working ?
Thanks for the help

Alundra
17th October 2013, 04:37
I have log and I found that all works.
The real problem is if the child is selected the scene can be dragged but I would block that, I don't know if it's possible.
The dragging is blocked only if the parent who is added in the scene is selected.
Thanks for the help

UPDATE : I resolved by adding "setFlag( QGraphicsItem::ItemIsSelectable );" on the child.
If a better way exist thanks to say it, hack needs to be added to remove the rectangle around him when this flag is set.