QTreeView - Item to have multiple colours
Is there a way that, I can set multiple colours on the item being displayed?
| --- Hello World | --- My Data |
In this, I want to show Hello in blue colour, World in red colour. And "My" in purple colour and "Data" in black colour.
How to achieve this?
Thanks for your help in advance.
You must research Qregexp and QTextCursor
hi @kumararajas ,
seems, you can achieve this using QStyledItemDelegate::paint(painter, newOption, index); .
Check this post.