Hello,
I have QStandardItemModel with QPixmap on first column. I want scale pixmaps but I can't figure out how to copy them back to tmp pixmaps.
QPixmap tmp
= QPixmap( model.
data( model.
index( i,
0 ), Qt
::DecorationRole ).
toByteArray() );
//tmp is empty
//at index i,0 are Pixmaps
QPixmap tmp = QPixmap( model.data( model.index( i, 0 ), Qt::DecorationRole ).toByteArray() );
//tmp is empty
//at index i,0 are Pixmaps
To copy to clipboard, switch view to plain text mode
Any suggestion are more then welcome.
EDIT:
qDebug() << model.data( model.index( i, 0 ), Qt::DecorationRole ).type();
//out: QVariant::QPixmap
qDebug() << model.data( model.index( i, 0 ), Qt::DecorationRole ).type();
//out: QVariant::QPixmap
To copy to clipboard, switch view to plain text mode
Bookmarks