PDA

View Full Version : QGraphicItem is not recognized



stella1016
1st July 2011, 15:38
I have a QWidget, inside it a QGraphicsView, inside it QGraphicsScene, inside it QGraphicsItem.

2 items exist now. After doing some resize of these items, use mouse click, inside certain item's region, the mouse click event cannot be received by the QGraphicsItem. Does anyone has an idea about the possiblity of this problem? Thanks in advance.

PS: i checked the boundingRect of the item, my click-point is inside it.

stampede
1st July 2011, 15:45
You can always install eventFilter on qApp object and add qDebug info inside. This way you can track down whats happening to the mouse press events.

meazza
1st July 2011, 16:05
So the items are clickable first and when you do some changes it isn't clickable anymore?

Well my first thought was that you arent changing the bounding rect when you resize the items and that you lose it somehow. Some code would be nice because could keep on guessing

stella1016
1st July 2011, 16:33
You can always install eventFilter on qApp object and add qDebug info inside. This way you can track down whats happening to the mouse press events.

Thanks for your suggestion. Now I am trying this way.