Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Custom pixmap and dynamic cursor while dragging item from QListView
munknex last edited by
How can I achieve these 2 things while dragging an item from QListView:
- I'd like to use custom pixmap instead of provided by default (which is just a copy of my item)
- Also I'd like to change cursor with one of my own, depending on possibility of underlying area to accept dragged item.
Sam last edited by
In order to use custom pixmap while dragging you can have a look in "QDrag::setPixmap()":http://doc.qt.nokia.com/4.7-snapshot/qdrag.html#setPixmap. You can write something like
@QDrag *drag = new QDrag(this);
in startDrag() event or mousePressEvent() whichever you are using.