📅  最后修改于: 2022-03-11 15:04:41.885000             🧑  作者: Mango
QDrag *drag = new QDrag(this);
QString text = QString("TEXT");
QMimeData *mimeData = new QMimeData();
mimeData->setText(text);
drag->setMimeData(mimeData);
Qt::DropAction dropAction = drag->exec(Qt::CopyAction|Qt::MoveAction);