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:
Qt Code:
  1. void myQTTreeWidget::dragEnterEvent(QDragEnterEvent *e)
  2. {
  3. e->accept();
  4. }
  5.  
  6. void myQTTreeWidget::dragMoveEvent(QDragMoveEvent *e)
  7. {
  8. e->accept();
  9. }
To copy to clipboard, switch view to plain text mode 
overrides all that functionality with.. nothing.