Bug in Qt 5.12 drag n'drop ?
-
@ModelTech can you provide a minimal compilable example that shows that change of behaviour ?
-
Hi. I had the same problem. Everything worked fine on Qt 5.7 then after I updated to Qt 5.12 dropping would not work at all.
At least in my case it seems that for previous version of Qt only implementingdragEnterEvent
was enough but with 5.12 I had to also override thedragMoveEvent
event.
So, basically I have this 2 things and now it works as expected. Hope it helps someone.void QtDropArea::dragEnterEvent(QDragEnterEvent *event) { event->acceptProposedAction(); } // this was added after updating to Qt 5.12 void QtDropArea::dragMoveEvent(QDragMoveEvent *event) { event->acceptProposedAction(); }
-
-
Thx for your hint with the dragMoveEvent() reimpl. I think I can reproduce your issue and also found the corresponding commit.
-
Can you please check if you get a dragEnterEvent in the problematic case? I would guess no.
The problem was introduced with f8944a7f07112c85dc4f66848cabb490514cd28e which is a bugfix for QTBUG-67155. -
@Christian-Ehrlicher I already did some cross-links, can you create a bugreport for that issue?
-
-
The bug will be fixed in 5.12.1