Results 1 to 3 of 3

Thread: QListWidget/QTreeWidget Drag and Drop

  1. #1
    Join Date
    Jun 2009
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QListWidget/QTreeWidget Drag and Drop

    Hi guys,

    I subclassed QListWidgetItem and QTreeWidgetItem so when those got copied/moved, all the custom data weren't copied/moved with it. Thus, I think I have to override drag drop methods in QListWidget and QTreeWidget but I have no idea how to do that? Any suggestions???

    Thanks a lot!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QListWidget/QTreeWidget Drag and Drop

    I think it might be enough if you reimplemented the clone() method.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    hlvietlong (30th June 2009)

  4. #3
    Join Date
    Jun 2009
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QListWidget/QTreeWidget Drag and Drop

    oh another thing I wanna do is to move (not copy) the items. I tried changed supportedDropAction to Qt.MoveAction only but that doesn't allow me to move at all. Do you have any suggestions?

Similar Threads

  1. drag and drop QToolButton in QToolBar
    By NBilal in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2008, 20:11
  2. Change cursor & status during Drag & Drop
    By ronlongo in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2008, 16:56
  3. Drag & Drop when parent and childs accept drops?
    By gri in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2008, 09:00
  4. Replies: 7
    Last Post: 8th September 2006, 16:19
  5. Drag and drop revisited
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 30th June 2006, 16:41

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.