Well, I've solved in this way:

added the following to the constructor:

Qt Code:
  1. QPen pen(QColor("blue"));
  2. m_Pixmap = new QPixmap(QSize(180, 20));
  3. m_Painter = new QPainter(m_Pixmap);
  4. m_Painter->setPen(pen);
To copy to clipboard, switch view to plain text mode 

and the mousePressEvent is now:

Qt Code:
  1. void CListWidget::mousePressEvent(QMouseEvent *event)
  2. {
  3. QListWidget::mousePressEvent(event);
  4.  
  5. if ( currentItem()->text().isEmpty() )
  6. {
  7. clearSelection();
  8. return;
  9. }
  10.  
  11. QByteArray itemData;
  12. QDataStream dataStream(&itemData, QIODevice::WriteOnly);
  13. dataStream << currentItem()->text();
  14.  
  15. m_Painter->fillRect(QRect(0, 0, 180, 20), QBrush(QColor("orange"))); // ADDED
  16. m_Painter->drawText(QRect(10, 0, 170, 20), currentItem()->text() ); // ADDED
  17.  
  18. QMimeData *mimeData = new QMimeData;
  19. mimeData->setData("application/x-dnditemdata", itemData);
  20. mimeData->setText(currentItem()->text());
  21.  
  22. QDrag *drag = new QDrag(this);
  23. drag->setPixmap(*m_Pixmap); // ADDED
  24. drag->setMimeData(mimeData);
  25. drag->exec(Qt::CopyAction);
  26. }
To copy to clipboard, switch view to plain text mode