title: QTableView with icons in rows
body: <p>I have a <code>QTableView</code> showing rows of a database table. In this table I have a column called data type and I have icon images for each type. How can I add these icons in front of each data type?</p>
  
  <p>Here's a part of my code as requested by <em>justanothercoder</em>.</p>
  
  <pre><code>QString msgQueryString = "select MESSAGE_ID, DATA_TYPE from SER_MESSAGES where MESSAGE_ID &gt; 500 ";
  serendibMsgTableModel-&gt;setQuery(msgQueryString, *database);
  serendibMsgTableModel-&gt;setHeaderData(0, Qt::Horizontal, tr("Message ID"));
  serendibMsgTableModel-&gt;setHeaderData(1, Qt::Horizontal, tr("Data Type"));
  
  serendibMsgProxyModel-&gt;setSourceModel(serendibMsgTableModel);
  serendibMsgView-&gt;setModel(serendibMsgProxyModel);
  </code></pre>
  
  <p>"serendibMsgTableModel" is a <code>QSqlQueryModel</code> and "serendibMsgProxyModel" is a customized <code>QSortFilterProxyModel</code>. "serendibMsgView" is the <code>QTableView</code> I need the icons to be displayed, in the Data Type column. </p>
  
  <p>Hope this helps for your answer.</p>