GH-4164 set instance drag image hotspot based on where the drag started
This commit is contained in:
parent
ae4939e0d2
commit
393d17b8d3
@ -669,11 +669,10 @@ void InstanceView::startDrag(Qt::DropActions supportedActions)
|
||||
}
|
||||
QRect rect;
|
||||
QPixmap pixmap = renderToPixmap(indexes, &rect);
|
||||
//rect.translate(offset());
|
||||
// rect.adjust(horizontalOffset(), verticalOffset(), 0, 0);
|
||||
QDrag *drag = new QDrag(this);
|
||||
drag->setPixmap(pixmap);
|
||||
drag->setMimeData(data);
|
||||
drag->setHotSpot(m_pressedPosition - rect.topLeft());
|
||||
Qt::DropAction defaultDropAction = Qt::IgnoreAction;
|
||||
if (this->defaultDropAction() != Qt::IgnoreAction && (supportedActions & this->defaultDropAction()))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user