Ok, I blocked the reimplement of mouseMove event and reimplement QListWidget::mimeData() as following:
QMimeData * MyListWgt
::mimeData ( const QList<QListWidgetItem
*> items
) { QList<QUrl> list;
list.
append(QUrl(currentItem
()->text
()));
// only QUrl in list will be text of actual item
// mime stuff
mimeData->setUrls(list);
return mimeData;
}
QMimeData * MyListWgt::mimeData ( const QList<QListWidgetItem *> items ) {
QList<QUrl> list;
list.append(QUrl(currentItem()->text())); // only QUrl in list will be text of actual item
// mime stuff
QMimeData *mimeData = new QMimeData;
mimeData->setUrls(list);
return mimeData;
}
To copy to clipboard, switch view to plain text mode
It did not solve the problem. The icons in the listwidget are not consistent after drap&drop (sometimes missing the caption with only icons shown, sometimes missing both). What I want is just pass the selected item info into the drop window with the items in the drag windown unchanged (like copy, but don't really duplicate the items).
Bookmarks