Is too bad idea to create a widget with the QCreator an use it to render all I need? (To avoid doing it manually)
Here is an example

Qt Code:
  1. class CustomItemDelegate : public QStyledItemDelegate
  2. {
  3. WidgetItem * witem;
  4. public:
  5.  
  6. CustomItemDelegate()
  7. {
  8. witem = new WidgetItem ();
  9. }
  10.  
  11. ~CustomItemDelegate()
  12. {
  13. delete witem;
  14. }
  15.  
  16.  
  17. void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const
  18. {
  19. witem->resize(option.rect.size());
  20.  
  21. /*
  22.   Here update the witem with some method with the real item data
  23.   Update labels, icons, and so on
  24.   */
  25.  
  26. painter->save();
  27. painter->translate(option.rect.topLeft());
  28. witem->render(painter);
  29. painter->restore();
  30. }
  31. }
To copy to clipboard, switch view to plain text mode 

Note that the widget is create just once and then all its components updated