Hi!

I have a custom tree view with drag/drop support.

Every node in the tree can have different types and descendants, hence some drops might be rejected.

The whole thing is already working because I reject invalid descendants within the setData() function of the model. However I would like to provide immediate visual feedback to the user changing the cursor drop icon.

The first solution I thought was implementing a custom dragMoveEvent() within the view which could retrieve constantly the cursor position and issue an Qt::IgnoreAction or Qt::CopyAction depending on the validity of the insertion. I do not like this because I would have to implement some model logic within the viewer. Since I have many node types I do not wish to define a new mimetype for everyone.

I am convinced there must be a more elegant solution based on MVC. Any ideas?