📜  QDrag and Drop - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:41.885000             🧑  作者: Mango

代码示例1
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);