I use QTextDocument for QStyledItemDelegate.

I need to draw 1px height horizontal line. <hr> does the trick but only width attr is accepted. I need to change its color instead of plain black.
Below html draws 2px line instead of 1px. I wonder why this is happening.

Qt Code:
  1. <p style='background:green;font-size:1px;height:1px;line-height:1px;padding:0;margin:0;'>&nbsp</p>
To copy to clipboard, switch view to plain text mode 

I tried also filling 1x1px of png image with repeat-x, but looks like repeat-x is ignored and it fill sentire space of the tag which gimme also 2px of height no matter what.

Looks like also "border" attr is ignored in QTextDocument as well, so cannot use it.

Any ideas how to it properly ?

Thanks