PDA

View Full Version : QDrag::exec is not calling QGraphicsView mouseRelease



wagmare
25th March 2015, 10:33
Hi friends,Experts,

I have implemented QGraphicsview with scene and two item.
if we drag and Drop between the items , it will create and add a new item in the scene.
the drag and drop functionality is working fine.

I have implemented mousePress and mouseMoveEvent in the QGraphicsView which will show open and closeHandle.

if the user double click on the item text it will add a QGraphicsTextItem and can edit the text in the item and once the text item lost focus, im deleting the editableTextItem.

after editing the text , when i drag and drop the item , the grahicsview mousemove is been called even after i dropped the item.

the problem happens when i set the focus on the QGraphicsTextItem as setFocus(Qt::MouseFocusReason);

i have attached the code with this post

11030