I'm glad we're all on the same page.  Looking into Justin's mention of
"taking" the item, I do see that functionality in the Convenience Widgets
(QTreeWidget, etc), but not in QAbstractItemModel.  Same with Marcus'
suggestion of moveRow(). I might be looking at the wrong documentation...(
http://srinikom.github.io/pyside-docs/PySide/QtCore/QAbstractItemModel.html
or http://qt-project.org/doc/qt-4.8/qabstractitemmodel.html).

I haven't gone into beginMoveRows yet, mainly as in dropMimeData I don't
have an index or parent for the original element (I think the model manages
that internally), although I can get the data from it (I look up the
element in my underlying data model using the serialization I put into the
MimeData).  I'm doing the reordering exactly as Marcus described as well,
although I'm currently inserting my cloned item.

I think I could serialize the index data in mimeData to reconstruct the
parent index in dropMimeData, that might be my next move so I can try
working with beginMoveRows and see if it's any cleaner.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAM33%3Da4JrU8hsvMJOHAk6%2BV7tWPNciLRR3qivL1N%3DCZd%3DjxvSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to