Originally Posted by
caduel
Well, please give us more details
Possible 'mistakes' are:
* signature errors (forgotten const)
* QTreeView::rootIsDecorated set to false
* indentation set to 0
But without more information it is hard to help.
Christoph
Thanks for your answer.
* Signatures are same (the plus/minus color is changed)
* rootIsDecorated set to false should not interfer with the drawing of items at depth >= 2 (i guess).
* indentation != 0
More precisely, i think i don't know what i should write in drawbranches or drawTree...
Here is an example code i tried... I try to put the same on drawbranches...
void MyTreeView
::drawTree(QPainter *painter,
const QRegion ®ion
) const { painter->setPen(color);
painter->save();
painter->restore();
}
void MyTreeView::drawTree(QPainter *painter, const QRegion ®ion) const {
QColor color(Qt::blue);
painter->setPen(color);
painter->save();
QTreeView::drawTree(painter, region);
painter->restore();
}
To copy to clipboard, switch view to plain text mode
Any tip would be appreciated.
I simply want a trivial dotted line
(But no QStyleSheet)
Bookmarks