Still no drop indicator. This seems like such a simple operation but I still can't figure out why it's not working.
I thought that using a proxy model might be causing my problems but the proxy model calls setSupportedDragActions( Qt::CopyAction | Qt::MoveAction ) in the constructor which should handle the model side of things. At the end of the proxy ctor the supported actions are:- Drop: Qt::CopyAction
- Drag: Qt::CopyAction | Qt::MoveAction
Here is my dragEnterEvent.
{
if ( pEvent->mimeData()->hasFormat( MY_MIMETYPE ) )
pEvent->acceptProposedAction();
else
pEvent->setDropAction( Qt::IgnoreAction );
}
void SheetView::dragEnterEvent( QDragEnterEvent* pEvent )
{
if ( pEvent->mimeData()->hasFormat( MY_MIMETYPE ) )
pEvent->acceptProposedAction();
else
pEvent->setDropAction( Qt::IgnoreAction );
}
To copy to clipboard, switch view to plain text mode
Bookmarks