Drag and Drop from ListView to Grid



  • Hello,

    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 ?
    Thanks.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.