Quote Originally Posted by Lykurg View Post
See the QTableWidgetItem::data() with the decoration role.
Thanks Lykurg!

Have tried this now ...

Qt Code:
  1. QPixmap TableWidget::selectedPixmap() const
  2. {
  3. if ( !currentItem() )
  4. {
  5. qDebug() << "no item found ...";
  6. return QPixmap();
  7. }
  8. else
  9. {
  10. qDebug() << "current item is" << currentItem();
  11. return currentItem()->data( Qt::DecorationRole ).value<QPixmap>();
  12. }
  13. }
To copy to clipboard, switch view to plain text mode 
but's still the same.

qDebug() returns 'current item is 0x1422a10'
qDebug() << currentItem()->data( Qt:ecorationRole ) returns ''QVariant(QString, "ArtMatch")'

But QSize returns 'QSize(-1, -1)'!

For testing I have tried to set my pixmap from an image with

Qt Code:
  1. QPixmap pixmap( ":/images/ampel_rot.jpg" );
To copy to clipboard, switch view to plain text mode 
With that my programm will work, but I need a pixmap with the content of currentItem()!

Any other ideas?