(C++) Qt drag and drop files or directories

You have to implement 2 protected virtual methods in your widget you want to accept file or directory drops:
- void dragEnterEvent(QDragEnterEvent *event)
- void dropEvent(QDropEvent *event)

And also you have to discount ed rx india. call setAcceptDrops(true); on this widget before it could accept drops.

  • Posted by on January 1st, 1970

This entry was posted in C++ and tagged , , , , , , , . Bookmark the permalink. Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Why ask?