I found a solution, but there were problems.
When I don't redirect to parent painter i have not stylesheet. But when I redirect I have two text: text by control(rich text) and text by qtreewidgetitem.
What I should do?
@
void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
QStyleOptionViewItemV4 newOption(option);
initStyleOption(&newOption, index);
painter->save();
QTextDocument doc;
doc.setHtml(newOption.text);
newOption.text = "";
newOption.state &= ~QStyle::State_Selected;
newOption.state &= ~QStyle::State_HasFocus;
newOption.state &= ~QStyle::State_MouseOver;
newOption.widget->style()->drawControl(QStyle::CE_ItemViewItem, &newOption, painter);
painter->translate(newOption.rect.left() + 20, newOption.rect.top());
QRect clip(0, 0, newOption.rect.width(), newOption.rect.height());
doc.drawContents(painter, clip);
painter->restore();
// QStyledItemDelegate::paint(painter, newOption, index);
}@