Qt 自定义dropEvent(), 需重写dragEnterEvent()和dragMoveEvent()
myWidget::dropEvent( QDropEvent *e )
{
//do something
}
myWidget::dragEnterEvent(QDragEnterEvent *event)
{
event->acceptProposedAction();
}
myWidget::dragMoveEvent(QDragMoveEvent *event)
{
event->acceptProposedAction();
}