void FilterSortingArea::dropEvent(QDropEvent *event) { FilterWidget *filter = qobject_cast<FilterWidget *>(event->source()); if (!filter) return; int moveId = filter->filterId(); int beforeId = dragAnimation(event); if (moveId != 0 && !mInterface.canMove(moveId, beforeId)) return; event->acceptProposedAction(); // need to clear the animation widget here, in case of new filter mEmptyWidget->hide(); update(); if (moveId > 0){ emit moveFilterRequested(moveId, beforeId); } else { emit addFilterRequested(mProcessorId, filter->filterType(), beforeId); } }