View Full Version : Drag and Drop in QGraphicsScene misses items

15th August 2009, 10:26
I have a number of ellipse items in a scene being viewed. Pressing a mousebutton on an item invokes MyScene::mousePressEvent() which always correctly identifies the item under the cursor using itemAt() but when I then invoke the base class QGraphicsScene::mousePressEvent() it will or will not invoke item::mousePressEvent().

When it does, everything works fine but I get an apparently random sequence of successes and failures when trying to move a number of ellipses (control points for curves) around.

Any ideas. I'm lost

28th August 2009, 15:44
Problem: The curves (QGraphicPathItems) started interfering with the controlpoints.

Solution: Give the controlpoints a higher Zvalue to make itemAt() or whatever selects the item prefer the controlpoints over other items.

30th August 2009, 16:17
Post #2 describes only part of the problem. Still looking.