31 #include <qclipboard.h>
32 #include <qfiledialog.h>
43 QModelIndexList indexes = selectedIndexes();
47 if (indexes.count() == 1 && objectExplorerModel)
50 QPixmap pixmap = objectExplorerModel->
getItemPixmap(indexes.at(0));
53 QDrag* drag =
new QDrag(
this);
54 drag->setPixmap(pixmap);
55 drag->setMimeData(objectExplorerModel->mimeData(indexes));
56 drag->setHotSpot(QPoint(pixmap.size().width() / 2, pixmap.size().height() / 2));
58 if (drag->start(supportedActions) == Qt::MoveAction)
60 std::cerr <<
"Qt::MoveAction not supported" << std::endl;
66 QTreeView::startDrag(supportedActions);