@Athius
Sure it works, here my code for a bookmark tree:
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
{ Q_UNUSED(column)
if(action EQ Qt::IgnoreAction) return false;
if(action EQ Qt::MoveAction)
{
QByteArray bytes=data->data(MIME_Bookmark);
QDataStream stream(&bytes,QIODevice::QIODevice::ReadOnly);
qintptr i; int r,c;
stream>>i>>r>>c;
QModelIndex index=createIndex(r,c,i);
moveRow(index,index.row(),parent,row);
}
return true;
}
Of course you need to create and return your custom data in mimeData () as well.