[Qt-interest] [SOLVED] Antwort: displaying QImage type in QTableView

Markus Franke Franke.M at sebakmt.com
Mon May 11 15:55:08 CEST 2009


My mistake....I didn't fully understand the concept of Qt::ItemDataRole. 
Of course I have to check for the Qt::DecorationRole in my 
QAbstractTableModel::data() callback function.

qt-interest-bounces at trolltech.com schrieb am 11.05.2009 10:00:03:

> 
> Dear all, 
> 
> I want to display images (QImage) in a QTableView. Therefore, I assigned 

> and implemented my own model (derived from QAbstractTableModel). In the 
> QAbstractTableModel::data() routine I return the images as a QImage data 

> type. However the images are not displayed in my table. The 
corresponding
> cell simply stays blank. Do I really need to implement my own delegate 
or
> can this be done with the standard QItemDelegate? 
> 
> Thanks for help and best regards, 
> 
> Markus Franke_______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090511/77b12ccd/attachment.html 


More information about the Qt-interest-old mailing list