28 #include <qfiledialog.h>
29 #include <qclipboard.h>
41 QModelIndexList indexes = selectedIndexes();
44 if (indexes.count() == 1 && objectExplorerModel)
47 QPixmap pixmap = objectExplorerModel->
getItemPixmap(indexes.at(0));
50 QDrag* drag =
new QDrag(
this);
51 drag->setPixmap(pixmap);
52 drag->setMimeData(objectExplorerModel->mimeData(indexes));
53 drag->setHotSpot(QPoint(pixmap.size().width() / 2, pixmap.size().height() / 2));
55 if (drag->start(supportedActions) == Qt::MoveAction)
57 std::cerr <<
"Qt::MoveAction not supported" << std::endl;
63 QTreeView::startDrag(supportedActions);