Hello,
I am trying to build my own custom view by subclassing QAbstractItemView, but I am having some problems getting it to display my items.
Basically, my view looks into a model and builds a graphical repsentation of the model using widgets to represent the items. Each widget has its own x and y coordinates that visualRect() uses to render the widgets on the view.
The problem is, visualRect() is only rendering the last item in the model on the view. None of the other items are rendered, even though I have verified that their positioning information is correct, and that visualRect() is returning a valid QRect with the proper size and coordinates. So it seems like visualRect() is only being called for the last item in the model.
Is there any way to ensure that visualRect() gets called for ALL items in the model? I've tried to invoke it manually for each index in my model, but it still doesn't work. It seems like Qt is doing something that I have no control over. Any advice?
Thanks!
Bookmarks