0
votes

I'm trying to implement some kind of drag and drop feature between two widgets with Qt 4.5. So I've reimplemented the mouse events methods to do what my program is supposed to do when I press the mouse button on the first widget and move the cursor & release the button on the second one.

Problem is: after the pressEvent on the first widget no other widget receives a mouse related event (move, release or enter) before the first widget got the release event. Even the first widget doesn't receive the leave event when the cursor goes outside, if the button was not released beforehand.

How can I make the target widget receive the mouse events before the button is released?

Thanks.

1

1 Answers

2
votes

IIRC you don't use "normal" mouse events for drag and drop in Qt. Read the appropriate section in Qt documentation.