hi guys, 

I'm looking at implementing a drag&drop to reorder a list of widgets in Qt. 
Turns out it's more complicated than what I expected and involves a lot of 
low-level work (
https://stackoverflow.com/questions/18299077/dragging-a-qwidget-in-qt-5)
Nothing crazy, but still a lot of -not obvious- code

Instead, I was wondering if it wouldn't be smarter to use a QTreeWidget, 
and add my widgets as QTreeWidgetItems, and therefore benefit from the 
native QTreeWidget drag&drop mechanism.

It works fine in a proof of concept, is much shorter and much more readable 
than implementing the drag&drop myself.. even works better in the behavior! 
But having it on a complete tool, in production conditions, is something 
else...

Did anyone face this issue before? Which option did you go for, the brute 
force implementation, or the QTreeWidget/QListWidget trick?

Thanks !

-- 
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/56569e89-0ade-4022-8372-a96e36bbb437%40googlegroups.com.

Reply via email to