Hi,

I'm trying to create a QTreeWidget that does not allow for scrolling. Basically what I need is that the frame of the widget is the same size of the contents of the tree. So if you expand the tree, the frame should become bigger. By default, the frame stays the same and a scroll bar is added.

(I would like to have this because I have a ScrollArea that contains two QTreeWidgets in a QVBoxLayout. I would like 1 vertical scrollbar for both trees at the same time, not one for each.)

Removing the scroll bars is easy, but the frame stays the same size. I can't find a way to resize it automatically.
I have tried reimplemting sizeHint, but I can't find the complete size of tree, only the part that is visible. Is there a way to find the size of the complete area of which you see a small part in you ScrollArea object? I thought maybe viewport->size() would do the trick, but it doesn't

How would I go about implementing this?
I'm using a Qt 4.3 snapshot :-)

p