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

Qt Code:
  1. QMimeData* mimeData = new QMimeData;
  2. QList<QUrl> urls;
  3. foreach (DesktopItemPointer pCheckedItem, m_checkedDesktopItems) {
  4. urls.append(pCheckedItem->getRawUrl());
  5. }
  6.  
  7. mimeData->setUrls(urls);
  8.  
  9. if (m_checkedDesktopItems.length() > 0){
  10. QPixmap dragPixmap = getCheckedPixmap();
  11. QDrag* pDrag = new QDrag(this);
  12. pDrag->setMimeData(mimeData);
  13. pDrag->setPixmap(dragPixmap);
  14. QRect borderRect = getCheckedBorderRect();
  15. pDrag->setHotSpot(QPoint(-borderRect.x() + QCursor::pos().x(), -borderRect.y() + QCursor::pos().y() ));
  16. Qt::DropAction action = pDrag->exec(Qt::MoveAction | Qt::CopyAction, Qt::CopyAction);
To copy to clipboard, switch view to plain text mode 
code on github: https://github.com/linuxdeepin/dde-d...frame.cpp#L514

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/