#include "droparea.h" #include #include #include DropArea::DropArea(QDeclarativeItem *parent) : QDeclarativeItem(parent), m_accepting(true) { setAcceptDrops(m_accepting); } void DropArea::dragEnterEvent(QGraphicsSceneDragDropEvent *event) { event->acceptProposedAction(); setCursor(Qt::DragMoveCursor); } void DropArea::dragLeaveEvent(QGraphicsSceneDragDropEvent *event) { unsetCursor(); } void DropArea::dropEvent(QGraphicsSceneDragDropEvent *event) { QList list = event->mimeData()->urls(); for(int i=0; i