How can I fill a row with custom color in QTreeView?
My model returns brushes fo case Qt::BackgroundRole but default paint() fills a row with indent.(see attached image)
tree.png

If I reimplement paint() with my own code:
Qt Code:
  1. QRect rc(option.rect);
  2. if (index.column() == 0)
  3. rc.setLeft(0);
  4. QBrush brush = index.model()->data(index,Qt::BackgroundRole).value<QBrush>();
  5. painter->fillRect(rc,brush);
To copy to clipboard, switch view to plain text mode 
so I lose all the tree primitives like dotted lines and +/- images

I need an advice how to fill a row without indent or good example how to draw tree primitives.
Thanks in advance!