PDA

View Full Version : [QGraphicsItem] isMovable && dragLeaveEvent



Spitz
27th November 2008, 15:38
Hi all,

I have a GraphicsPixmapItem and have set the flags to isMoveable.

Now I would like to know where the drag ended.

I've reimplemented the dragLeaveEvent method, but they seem not to triggered.

It must be possible, but I don't know how.
Do I also need to enable something in te QGraphicsScene?


Thanks in advance,

Spitz

aamer4yu
27th November 2008, 15:56
You dont need to override the drag events...
just set the flags,, and thats it. remove the drag code and verify :)

Spitz
27th November 2008, 18:31
But how do I know when the drag was ended to ask the current cursor position?

I need to know when a drag starts/ends.

Thanks,

Spitz

aamer4yu
28th November 2008, 09:55
What do u need it for ??
You can also check mouseReleaseEvent if it suits ur need,, bec when drag will end, the user will definitely release the mouse ;)