Details
-
Suggestion
-
Resolution: Unresolved
-
P5: Not important
-
None
-
None
Description
When I want to set my custom pixmap for dragging in a QAbstractItemView subclass, I have to override
void QAbstractItemView::startDrag(Qt::DropActions supportedActions)
because the default pixmap was created in the default implementation of this method, it cannot be altered in subclasses without overriding the method and executing a QDrag manually.
What I suggest is to put the default pixmap into a virtual protected function like QPixmap dragPixmap(), which when overriden, we can use to return our custom pixmaps for dragging.
Thanks for reading!