I was created a app ui, a file or program, represented by an icon,
I want draging a icon to github, and then the file upload to github
my drag code like this
code on github: https://github.com/linuxdeepin/dde-d...frame.cpp#L514Qt Code:
QList<QUrl> urls; foreach (DesktopItemPointer pCheckedItem, m_checkedDesktopItems) { urls.append(pCheckedItem->getRawUrl()); } mimeData->setUrls(urls); if (m_checkedDesktopItems.length() > 0){ pDrag->setMimeData(mimeData); pDrag->setPixmap(dragPixmap); Qt::DropAction action = pDrag->exec(Qt::MoveAction | Qt::CopyAction, Qt::CopyAction);To copy to clipboard, switch view to plain text mode
but the file can't upload, I suspect that the problem is with mimedata ...
github support drag file to upload
"File uploading is now available
You can now drag and drop files into your repositories. "
learn more https://help.github.com/articles/add...-a-repository/
Bookmarks