Results 1 to 2 of 2

Thread: Drag and Drop from a list, is this even posssible with QML?

  1. #1
    Join Date
    Oct 2009

    Default Drag and Drop from a list, is this even posssible with QML?

    Hi guys,

    I have a backend model in C++ that is being pushed to a ListView in QML. I want the user to be able to drag a list item from the list and drop it which will remove the element from the list.

    Is drag and drop (or hacking to make it look like its really drag and dropping) possible with QML? If so could someone direct me to an example perhaps?


  2. #2

    Default Re: Drag and Drop from a list, is this even posssible with QML?

    On the colums page of the documentation there is something that might be used for this (look at the paragraph on transitions)
    But there you'd have to reimplement the entire ListView functionality

    Another idea would be to remove/add the item from/to the list on the drag event in the C++ code and push the list to the QML again (probably rather inefficient for large lists).

    I found this 3rd Party solution but haven#t tried it out (since I'm planning on using drag and drop for lists in the near future, too)

    I haven't really decided which way to go yet. Still hoping the Trolls will come up with something official.

Similar Threads

  1. Replies: 2
    Last Post: 13th October 2010, 22:51
  2. Replies: 3
    Last Post: 10th June 2010, 16:13
  3. Replies: 0
    Last Post: 4th May 2010, 11:24
  4. Drag and Drop from a list to a form
    By orbital_fox in forum Qt Programming
    Replies: 0
    Last Post: 1st October 2009, 19:29
  5. Drop down checkbox list
    By rbp in forum Qt Programming
    Replies: 2
    Last Post: 28th October 2008, 02:36


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.