[PyQt] QTreeWidget/View: reimplementing drawTree()

Phil Thompson phil at riverbankcomputing.com
Fri Apr 1 09:28:42 BST 2011


On Thu, 31 Mar 2011 16:09:16 -0700 (PDT), James Polk <jpolk5001 at yahoo.com>
wrote:
> I need to change/assign a unique color to the tree and branches of a
> QTreeWidget.
> It appears I need to reimplement the drawTree() function.  While I've
> implemented
> a treeview delegate before, this is unique enough (at least to me) to
have
> me a
> but stumped on syntax.  I've searched high and low for documentation and
> examples
> and can't find anything definitive.
> 
> Does anybody out there have any experience or knowledge that you can
share
> on this?
> 
> Many Thanks,
> -JP

You can't reimplement drawTree() as it isn't virtual. drawRow() is
however.

Phil


More information about the PyQt mailing list