Kal
25th September 2008, 00:25
If I override drawRow() in my QTreeView subclass and place only a call to the base class's drawRow, and pass the same parameters I received, the tree will draw normally.
If I take the QPainter parameter and call setPen(Qt::red) followed by base::drawRow(), the tree will draw normally except for items with children. Those items will have the '+' or '-' expansion symbol drawn in red. The text is not red.
I don't understand why drawRow takes a QPainter parameter if it doesn't use it. Calling the item delegate's paint() draws the text in the wrong location but in the same default color.
If I take the QPainter parameter and call setPen(Qt::red) followed by base::drawRow(), the tree will draw normally except for items with children. Those items will have the '+' or '-' expansion symbol drawn in red. The text is not red.
I don't understand why drawRow takes a QPainter parameter if it doesn't use it. Calling the item delegate's paint() draws the text in the wrong location but in the same default color.