pyside qtreewidget constrain drag and drop
问题 I'm trying to add a constraint to the QTreeWidget drag and drop function to prevent the branches from entering another branch in another root. Here's an example to make things more clear: I have 4 objects. Lets call them apple, banana, carrot, durian. The tree looks like this: isDelicious (Root) |-- BackgroundObjects (Branch) |-- Durian |-- ForgroundObjects (Branch) |-- Apple |-- Banana |-- Carrot isSmelly (Root) |-- BackgroundObjects (Branch) |-- Apple |-- Carrot |-- ForgroundObjects (Branch