视频文件放在QClipboard上

  QClipboard *clipboard = QApplication::clipboard();
        QString name = "file:///" + fileInfo.filePath();
        QUrl a(name);
        qDebug() <<"mp4 filepath is " <<  name;
        QList urls;
        urls.append(a);
        QMimeData *data = new QMimeData;
        data->setUrls(urls);
        clipboard->setMimeData(data);

你可能感兴趣的:(视频文件放在QClipboard上)