setting width of QTreeView branch indicator
Hi folks!
I need to change width of branch indicator of QTreeView, but i cannot find corresponding parameter in QStyle class.
https://wmpics.pics/di-3W5P.png
I've tried to reimplement all virtual methods in QCommonStyle class which return int, QSize or QRect but the width of branch indicator is always 20.
Code:
{
if (elem == PE_IndicatorBranch)
if (option->state & State_Children) {
const int width = option->rect.width(); // width is always 20
painter
->setPen
(QPen(Qt
::red));
painter->drawRect(option->rect);
}
}
https://wmpics.pics/di-7K83.png
I know that it seems to be possible to do using stylesheets, but i need to do that in styles, no stylesheets.
How could i resize this indicator?
Re: setting width of QTreeView branch indicator