come on man, I've already posted an example, it has all what you want
...QTDIR/examples/widgets/cons/imagedelegate.cpp...