I see in the following thread that there are problems with QTreeWidget and horizontal scrollbars.

http://www.qtcentre.org/threads/1239...dget-ScrollBar

The above thread says this problem is supposed to be fixed, but I am using Qt 4.7.4 (open source version) and I see that the problem is still there.

Here is the problem:

I have a QTreeWidget in which each item has an icon and a text. The widget has been set to have horizontal and vertical scrollbars "as needed".
The vertical scrollbar appears as expected. However, the horizontal scrollbar only appears when the size of the widget has shrunk to the point where it covers the icon.
When the widget is shrunk to cover the text part, the horiz. scrollbar does not appear.

And even when the horiz. scrollbar appears, it thinks the item is as wide as the icon only and therefore scrolls very little to show the icon. The text is still not visible.

It seems to me that QTreeWidget does not have the proper size of each item. Is there a fix or a workaround for this? Any help is appreciated.

Thanks,

--abhijit