Q_ASSERT(index.column() == 0);
if (event) {
- QPoint offset;
+ QPoint offset = QPoint(0, 0);
QStaticText text = event->staticText();
//text.setTextWidth(option.rect.width());
//QStyledItemDelegate::paint(painter, option, index);
QStyle *style = QApplication::style();
style->drawControl(QStyle::CE_ItemViewItem, &option, painter, 0);
+
+ // draw thumbnail of frame
+ if(event->type() == ApiTraceEvent::Frame) {
+ ApiTraceFrame *frame = static_cast<ApiTraceFrame*>(event);
+ QImage thumbnail = frame->thumbnail();
+ if (!thumbnail.isNull()) {
+ painter->drawImage(option.rect.topLeft() + offset, thumbnail);
+ offset += QPoint(option.rect.height() + 16, 0);
+ }
+ }
+
if (event->hasState()) {
QPixmap px = m_stateEmblem.pixmap(option.rect.height(),
option.rect.height());