PDA

View Full Version : Drag and drop from QPlainTextEdit to QListWidget



rakkar
21st October 2009, 20:19
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!

wysota
22nd October 2009, 01:02
dropEvent() won't be called unless dragEnterEvent() accepts the drag event first.