Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved How to drag an item from one ListView to another

    QML and Qt Quick
    2
    4
    906
    Loading More Posts
    • 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.
    • Nelly
      Nelly last edited by

      Hi, everyone!
      I started to learn QML recently. And I faced the problem of dragging.
      I would like to know is it possible to drag an item from one ListView to another?
      I learnt Drag and Drop in the Documentation, but I didn’t understand how to implement it.```

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        Hi
        Just to make sure you saw this free book
        https://qmlbook.github.io/
        :)

        1 Reply Last reply Reply Quote 0
        • Nelly
          Nelly last edited by

          I have looked at this book, good book, but I didn't see something for my question

          mrjj 1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @Nelly last edited by mrjj

            @Nelly
            Ok, didn't read it yet ;)
            This tut
            http://doc.qt.io/qt-5/qtquick-tutorials-dynamicview-dynamicview1-example.html
            Goes into drag drop (inner)
            http://doc.qt.io/qt-5/qtquick-tutorials-dynamicview-dynamicview3-example.html
            maybe it will give info.

            Also
            http://doc.qt.io/qt-5/qtquick-draganddrop-example.html

            In c++, Views have default drag and drop if enabled. I wonder if QML somehow offer the same.
            Let me check it.
            http://stackoverflow.com/questions/26045587/using-drag-and-drop-with-listview-to-create-an-inventory-ui

            Is the closest sample that come up. (credits to wieland)

            Give it some days. Maybe others have more suggestions.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post