how to drag a file to github ?
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:
QList<QUrl> urls;
foreach (DesktopItemPointer pCheckedItem, m_checkedDesktopItems) {
urls.append(pCheckedItem->getRawUrl());
}
mimeData->setUrls(urls);
if (m_checkedDesktopItems.length() > 0){
QPixmap dragPixmap
= getCheckedPixmap
();
pDrag->setMimeData(mimeData);
pDrag->setPixmap(dragPixmap);
QRect borderRect
= getCheckedBorderRect
();
pDrag
->setHotSpot
(QPoint(-borderRect.
x() + QCursor::pos().
x(),
-borderRect.
y() + QCursor::pos().
y() ));
Qt::DropAction action = pDrag->exec(Qt::MoveAction | Qt::CopyAction, Qt::CopyAction);
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/
Re: how to drag a file to github ?
What does "drag to github" mean?
Dragging into a special Github client app?
Dragging into a browser?
Dragging into a Git UI that works on a clone of a github repository?
Cheers,
_
Re: how to drag a file to github ?
can't Draging into a google chrome browser
firefox is ok