Custom Drag&Drop cursors
-
Is it somehow possible to use custom drag and drop cursors? It seems like now they are hardcoded (and on Windows they even don't correspond to current cursor theme).
I also need to do it in runtime, because I'd like to use different cursors for different content type. Any ideas?
-
You can change cursor with help of "QCursor class":http://doc.qt.nokia.com/4.7-snapshot/qcursor.html
Change it in "dragEnterEvent":http://qt-project.org/doc/qt-4.8/qwidget.html#dragEnterEvent and set it back in "dragLeaveEvent":http://qt-project.org/doc/qt-4.8/qwidget.html#dragLeaveEvent
-
This won't work, because after dragEnterEvent and dragLeaveEvent handlers QDragManager reset cursors. So changing cursor there will not have any effect.
Actually the correct way is to keep QDrag object and to call setDragCursor() every time we want to change it. But it is impossible now (4.8.3). So I've provided a "patch":https://codereview.qt-project.org/35893