Results 1 to 2 of 2

Thread: Drag and drop from QPlainTextEdit to QListWidget

  1. #1
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Drag and drop from QPlainTextEdit to QListWidget

    I'd like to add drag and drop where a user selects text in a QPlainTextEdit and drags it over to a QListWidget, which only happens to contain lines of text. I tried putting a breakpoint in QListWidget::dropEvent so I could trace through and kind of figure out what to call, since I didn't see any virtual functions to override for it. But the breakpoint didn't hit, so I'm at a bit of a loss what to do.

    Is this possible, and if so, would anyone mind giving me pointers on where to look first?

    Thanks!

  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: Drag and drop from QPlainTextEdit to QListWidget

    dropEvent() won't be called unless dragEnterEvent() accepts the drag event first.
    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:

    rakkar (22nd October 2009)

Similar Threads

  1. QListWidget Drag and Drop problem
    By winkle99 in forum Qt Programming
    Replies: 0
    Last Post: 20th October 2009, 21:00
  2. Jambi QListWidget Drag & Drop
    By ronnyf in forum Qt Programming
    Replies: 0
    Last Post: 4th February 2009, 23:58
  3. Change cursor & status during Drag & Drop
    By ronlongo in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2008, 17:56
  4. Drag from QTreeWidget and drop in QListWidget
    By WXNSNW in forum Qt Programming
    Replies: 1
    Last Post: 25th August 2008, 01:15
  5. Drag and drop revisited
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 30th June 2006, 17:41

Tags for this Thread

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.