QML ListView Drag and Drop reorder
I am wondering if there's any example showing reoder entries of a QML ListView by drag and drop. If there isn't, can someone point me to the right places (classes) that I should check to accomplish this. Thanks.
There are some experimental works on drag'n'drop (3rdparty), but AFAIK there is no support for d'n'd in official qml.
I guess it makes sense. From this limitation, my impression is that QML's goal is not a full blown replacement for coding GUI using traditional widgets. If this is not the case, will someone please let me know.
btw, what are the experimental works on drag'ndrop? I am interested to at least take a look on how this problem is being solved.
Don't remember the link, but something like query "qml drag n drop" will help you I think
You can find the 3rd party Drag and Drop project "here":http://bitbucket.org/gregschlom/qml-drag-drop.
Reordering view items by drag and drop is something we'd like to support well in the official views (it's possible to some extent now, but it's not easy); we unfortunately didn't have the resources to add it for the initial release.
I just wrote a blog post about how I pulled this off. If you would like to check it out here you go. It comes with all the code. Feel free to use it if you want.
It was a fun puzzle to solve. There was more to it than I initially thought for sure.
Thanks for reporting back with your solution! It was a nice read, and I'm sure someone will benefit from it in the future.