n my QT application i have two qtreewidget A and B. I want rewrite drag and drop function for this two behavior:

-From A to A move items with all childrens.
-From B to A copy items wirh all childrens.

I have view that in dropEvent function i have event.source() for take source. But how change function with flag for movement or copy dinamically? There is an example?