PDA

View Full Version : Scrool bar in treeWidget not properly shown?



vishal.chauhan
16th October 2007, 07:49
Hi All,

I m using qt 4.1.5 on my MAC.
I have a treeWidget In which i have horizontal scrollbar but when i resize the scrollbar doesnot look very good.Actually it shows some contents under it.

chaek the attachment.

Thanks.

jpn
19th October 2007, 03:39
Unfortunately you can't resize a scrollbar just like that. QAbstractScrollArea (yes, QTreeWidget is a QAbstractScrollArea) expects scrollbars to be of certain size while managing them. One proper way to do it would be to use a proxy style (http://wiki.qtcentre.org/index.php?title=Proxy_style), reimplement QStyle::pixelMetric() and return something custom for QStyle::PM_ScrollBarExtent.