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. QML ListView Drag and Drop reorder

QML ListView Drag and Drop reorder

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 5 Posters 12.1k Views 1 Watching
  • 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.
  • E Offline
    E Offline
    enlightened_j
    wrote on last edited by
    #1

    Hi guys,

    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.

    Jason

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      There are some experimental works on drag'n'drop (3rdparty), but AFAIK there is no support for d'n'd in official qml.

      1 Reply Last reply
      0
      • E Offline
        E Offline
        enlightened_j
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DenisKormalev
          wrote on last edited by
          #4

          Don't remember the link, but something like query "qml drag n drop" will help you I think

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mbrasser
            wrote on last edited by
            #5

            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.

            Regards,
            Michael

            1 Reply Last reply
            0
            • S Offline
              S Offline
              shullw
              wrote on last edited by
              #6

              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.

              "http://blogofmu.com/2011/04/18/drag-and-drop-reorder-list-in-qml-qt/":http://blogofmu.com/2011/04/18/drag-and-drop-reorder-list-in-qml-qt/

              It was a fun puzzle to solve. There was more to it than I initially thought for sure.

              A QML Purest Point of View!

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                Thanks for reporting back with your solution! It was a nice read, and I'm sure someone will benefit from it in the future.

                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