fix item visible when drag out of panel

Change-Id: I7fff7fb127d59685aa3f09f0c4517ab3715c5b1c
This commit is contained in:
石博文 2016-06-20 15:42:31 +08:00 committed by Hualet Wang
parent 35c5bd15f8
commit 723f14838f
2 changed files with 6 additions and 1 deletions

View File

@ -137,6 +137,7 @@ void AppItem::startDrag()
qDebug() << "dnd result: " << result;
m_draging = false;
setVisible(true);
update();
}

View File

@ -142,5 +142,9 @@ void MainPanel::itemDragStarted()
{
DragingItem = qobject_cast<DockItem *>(sender());
DragingItem->setVisible(rect().contains(QCursor::pos()));
QRect rect;
rect.setTopLeft(mapToGlobal(pos()));
rect.setSize(size());
DragingItem->setVisible(rect.contains(QCursor::pos()));
}