I'm not sure I fully understand the intention, from reading your code.
Is that a typo when you use "setDragDropMode" on the QMainWindow? Was
it meant to be set on the tree view?

What I am seeing is that you set the drop mode on the tree to
InternalMove, and you have drag/drop event methods defined on the main
window. Which drag/drop behaviour are you hoping to implement? Setting
InternalMove on the tree view means that it only allows moving the
tree view items around within itself, and no drag/drag from outside
the view. Then you have drag/drop on the main window, so are you
trying to accept external drops?

On Thu, Feb 13, 2020 at 2:17 PM Dilen Shah <dilensha...@gmail.com> wrote:
>
> Hey guys,
>
> I have been trying to get dropevent working in Pyside2. So my UI is built in 
> QtDesigner with QMainWindow as main class and have QTreeWidget in that same 
> class.
>
> Is there a way i can fire up QTreeWidget dropEvent when the items are moved 
> and the order has been changed.
>
> Here is my code: https://pastebin.com/WhPRyEgv
>
> If anyone can figure this out for me, would be greatly appreciated.
>
> Thanks,
> Dilen.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/python_inside_maya/2ebb4f44-1d76-422f-af20-aeaf63793013%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2eqYnUUShkFdtg7keBV6tvONEqDPsKvQO9d6WNDsXqTg%40mail.gmail.com.

Reply via email to