Highlighting QTreeWidgetItem
When I was trying to highlight selected QTreeWidgetItem the display is not proper as expected. I expected the behaviour should highlight only the text portion of the QTreeWidgetItem, but iam getting the highlight till the end of the widget area and is not proper. I have used the below code in the constructorof my class.
Code:
palette.
setColor(QPalette::HighlightedText, Qt
::white);
palette.
setColor(QPalette::Highlight, Qt
::blue);
setPalette(palette);
Thanks in advance.
Re: Highlighting QTreeWidgetItem
I guess what u want is not acheivable directly.
You can achieve it using item delegates. In the delegate u can set the textcharformat for the string....