PDA

View Full Version : QScrollArea horizontal scrollbar problem



navieh
6th April 2013, 22:17
Hi, I am having a problem with qt scroll bar, please check my attached screenshot.
8890
I loaded 2 pdf files. The first one only has a few pages so the horizontal scrollbar is hidden, and this looks good.
The 2nd file has too many pages so the horizontal scrollbar is shown. Now, the problem is that scrollbar takes some space, so the vertical scroll bar is also visible.
I want to hide that vertical scroll bar, so I guess I will need to extend the height of my pdf widget a little bit, how can I get the height of that horizontal scrollbar? And is there any better solution?

ChrisW67
7th April 2013, 03:08
Don't know for sure, but I would have a look at QStyle::pixelMetric() with QStyle::PM_SliderThickness or QStyle::PM_SliderControlThickness.

wysota
7th April 2013, 10:30
One can also try horizontalScrollBar()->sizeHint().height().