QTreeView
Solved
Qt for Python
-
I would like to know if there's a way to have different headers at different levels of a QTreeView. I have data which requires 3 columns at the first level, 6 columns at the next level, and 2 columns at the deepest level.
Right now I have a QTreeView which looks like this:
The number of columns seem to be fixed at 3 no matter what I do.
If QWTreeview currenlty won't do this, I suppose that I could use a series of QtreeViews with only one level on each object, but that seems clunky to me.
-
Hi,
To the best of my knowledge, no. The headers are populated by the model and are usually independent of the data.
As for the number of columns, there's no restriction. Your model is responsible for returning the appropriate number. -