add drag icon

Change-Id: If99aae47d08a3d074214565d132de1fef9bf605b
This commit is contained in:
石博文 2016-06-23 17:53:20 +08:00 committed by Hualet Wang
parent addd77b263
commit f8233ed0eb

View File

@ -219,12 +219,9 @@ void AppItem::startDrag()
m_draging = true;
update();
QPixmap pixmap(25, 25);
pixmap.fill(Qt::red);
QDrag *drag = new QDrag(this);
drag->setPixmap(pixmap);
drag->setHotSpot(pixmap.rect().center());
drag->setPixmap(m_smallIcon);
drag->setHotSpot(m_smallIcon.rect().center());
drag->setMimeData(new QMimeData);
emit dragStarted();