QAbstractItemModel::dropMimeData() is called by QAbstractItemView::dropEvent() so reimplementing dropEvent() without calling the base class implementation prevents dropMimeData() from being called. Furthermore, reimplementing other drag and drop related event handlers, again, without calling the base class implementation like in the code above, prevents QAbstractItemView DND from functioning properly. Take a look at src/gui/itemviews/qabstractitemview.cpp and see what QAbstractItemView::dragEnterEvent() and QAbstractItemView::dragMoveEvent() do. Writing:
overrides all that functionality with.. nothing.Qt Code:
{ e->accept(); } { e->accept(); }To copy to clipboard, switch view to plain text mode![]()
Bookmarks