[Qt-interest] Can't receive QDropEvent on QListWidget

Bachrach, Robert L rob.bachrach at tycoelectronics.com
Tue Dec 16 16:08:51 CET 2008


Ying Ma wrote:
> I met a problem that the QListWidget couldn't receive QDropEvent. I've already used "setAcceptDrops()"
> function to enable the acceptance of QDropEvent for the QListWidget. But what I saw is the QListWidget
> only received QDragEnterEvent but not QDropEvent. How could it only receive QDragEnterEvent but not
> QDropEvent? any ideas?

You need to look for the event on the viewport() of the QListWidget.  Depending on the nature of your code, you may need to install an event filter on the viewport to catch the event.

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081216/77f96f2d/attachment.html 


More information about the Qt-interest-old mailing list