QDrag and Drop
void TestWidget::dragMoveEvent(QDragMoveEvent *event)
{
if(event->mimeData()->hasUrls() || event->mimeData()->hasText())
event->acceptProposedAction();
}
void TestWidget::dragEnterEvent(QDragEnterEvent *event)
{
if(event->mimeData()->hasUrls() || event->mimeData()->hasText())
event->acceptProposedAction();
}
void TestWidget::dropEvent(QDropEvent *event)
{
qDebug()<<event->mimeData()->text();
}