Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Drag and Drop from ListView to Grid
Renzo38 last edited by
I am looking for the best way to achieve the following thing in QML:
I have a ListView with droppable elements and a Grid initialy filled with DropArea. The ListView uses a custom model derived from QAbstractItemModel. I would like to drop an element on the grid and interact with both elements (the one in the ListView and the one in the Grid) so any modifications on an item should modify the other. I tried the following thing:
create a ListView displayed on the dropped item, using the same model as the source ListView used to drag items
set the same rootIndex, then the same index but set the rootindex seems not working
This is surely not the best way to do this, so how can i achieve this ?