I have a custom item delegate to color tableview rows.
It works fine with one exception - the text is drawn with no margin.
The standard delegate sets a small margin to the left of the text it draws.
I have looked at the Trolls source for the standard delegate but with my limited skills, I can't see how to achieve this in my code.
This is the line that draws the text:

painter->drawText(option.rect, Qt::AlignJustify, index.data().toString());

Any ideas are appreciated....