Quote Originally Posted by jpn View Post
Hello.

I must say that I fully agree with Marcel. The whole point with item views is to get rid of expensive widgets, to replace them with light items.

Would you mind describing a bit what you do? Maybe we could find a way to do it with delegate..
Basically, I'm trying to create a custom view that displays a hierarchy of data in a tree format. I am already using a separate software library to calculate the coordinates of each node and it's connecting lines, so I have all the positioning data I need.

We considering doing this using a QGraphicsScene at first, but each node needs to represent an item in a QStandardItemModel, and so the 2D approach simply won't work for us. Therefore, I have relegated to subclassing QAbstractItemView to obtain this functionality.

I am pretty close to getting it functional--I can draw the lines by overriding paintEvent(), but I can't seem to get all the nodes to render. Only the last leaf node in the model seems to display, even though I have verified that each node has the correct positioning data. I have even tried calling visualRect() manually on each item in the model, and still no luck.

Thanks again for the help!