PDA

View Full Version : Drag and Drop in QGraphicsScene misses items



enno
15th August 2009, 09: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
Enno

enno
28th August 2009, 14: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.

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