Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Drag and Drop from ListView to Grid

Drag and Drop from ListView to Grid

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 384 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Renzo38R Offline
    Renzo38R Offline
    Renzo38
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved