Thank you for your answer.

So "what is this all about":

I have an application with lots of different widgets (treeviews, listviews, iconviews .... ). All widgest support dnd (all of them are still old qt3 style, but will/should () be "converted" soon). In my (derived) QTreeView I want do accept the drags from some of the other widgets, but not from all of the other widget. I thought the dragEnterEvent can (has to) be used for defining which events are accepted and which are not:

Qt Code:
  1. void myQTListView::dragEnterEvent(QDragEnterEvent *e)
  2. {
  3. if ( e )
  4. {
  5. if ( e->provides("mystuff/mything") )
  6. {
  7. e->accept();
  8. }
  9. else
  10. {
  11. e->ignore();
  12. }
  13. }
  14. }
To copy to clipboard, switch view to plain text mode 



I also have different items (all derived from QTreeWidgetItem of course) in my treeview. Some of them accept drops and some of them don't. So I use the dragMoveEvent to get the "current dropping target" by calling

Qt Code:
  1. void myQTListView::dragMoveEvent(QDragMoveEvent *e)
  2. {
  3. QTreeWidgetItem *item = itemAt(e->pos());
  4.  
  5. bool accept = false;
  6.  
  7. if ( item )
  8. {
  9. if ( dynamic_cast<MySpecialListViewItem*>(item) )
  10. {
  11. accept = true;
  12. }
  13. }
  14.  
  15. if ( accept )
  16. {
  17. e->accept();
  18. }
  19. else
  20. {
  21. e->ignore();
  22. }
  23. }
To copy to clipboard, switch view to plain text mode 

and check (by dynamic cast) if this (derived) QTreeWidgetItem is one of the items that accept drops.

I use the event->accept() or event->ignore() function to indicate if dropping is possible or not.

ps. Sorry that this has become a beginner tutorial on using drag and drop with QTreeViews, maybe I was running completely in the wrong direction?