Posted something about this earlier... but it kinda got lost in the posts... so im posing the question again with a better title haha.

i have written a custom item delegate... but it doesnt seem to work

Qt Code:
  1. class MyItemDelegate: public QItemDelegate
  2. {
  3. public:
  4. MyItemDelegate(QObject* pParent = 0) : QItemDelegate(pParent)
  5. {
  6. }
  7. void MyItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
  8. {
  9. QIcon icon = qvariant_cast<QIcon>(index.data(Qt::DecorationRole));
  10. drawBackground(painter, option, index);
  11. drawDecoration(painter, option, option.rect, icon.pixmap(option.rect.size()));
  12. drawFocus(painter, option, option.rect);
  13. }
  14. };
To copy to clipboard, switch view to plain text mode 

anyone have any ideas? im real desperate to get this thing working, ive been working on it for days now and i dont know where else to look