Results 1 to 2 of 2

Thread: Catch drag and drop items

  1. #1
    Join Date
    Jul 2008
    Posts
    26
    Qt products
    Qt4
    Platforms
    Windows

    Question Catch drag and drop items

    Dear,

    There is a way to detect which is the object that is dragged and dropped.
    In my specific case I have a QTreeWIdget that allows drag and drop actions only for top level items. I want to be always able to make an ordered list of the top level elements. So if a drag and drop action happened I have to catch it!

    I was thinking to reimplement dragEnterEvent ( QDragEnterEvent * ) and dropEvent ( QDropEvent * ). Is it correct? or does exist another way to do that that now I cannot see?

    Thanks

    Annalisa

    P.S let me know if you cannot understand the problem, I'll re-explain it better!

  2. #2
    Join Date
    Jul 2008
    Posts
    26
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Catch drag and drop items

    I solved!

    I implement a function that verify if a drag and drop action has taken place!
    everything seems work....

    Bye

Similar Threads

  1. Drag and Drop in a QTreeWidget subclass
    By kishore in forum Qt Programming
    Replies: 2
    Last Post: 14th May 2008, 07:12
  2. Drag Drop between Different Views
    By aamer4yu in forum Qt Programming
    Replies: 13
    Last Post: 8th December 2006, 04:29
  3. Drag & drop items on the same QTreeView
    By wind in forum Qt Programming
    Replies: 2
    Last Post: 11th October 2006, 14:29
  4. Drag and drop revisited
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 30th June 2006, 16:41
  5. Drag and drop items in view to sort order
    By Big Duck in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2006, 19:43

Bookmarks

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.