I tried that with:

Qt Code:
  1. QPixmap pixmap;
  2. QPainter paint(&pixmap);
  3. QFont font;
  4. QFontMetrics met(font);
  5. paint.drawText(met.boundingRect("Some text here"),Qt::AlignLeft,"Some text here");
  6. mimeData = new QMimeData;
  7. mimeData->setData("object/x-IMPACT-plugin", itemData);
  8. mimeData->setText("Some text here");
  9. drag = new QDrag(this);
  10. drag->setMimeData(mimeData);
  11. drag->setPixmap(pixmap);
  12. drag->exec(Qt::MoveAction);
To copy to clipboard, switch view to plain text mode 

But I still don't get it!