Use QAbstractItemView::setDragDropMode and QAbstractItemView::setDragEnabled to enable drag & drop on your QTreeWidget.

Use QStandardItem::setDropEnabled to allow/disallow drops on a specific item.