1 Attachment(s)
QScrollArea horizontal scrollbar problem
Hi, I am having a problem with qt scroll bar, please check my attached screenshot.
Attachment 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?
Re: QScrollArea horizontal scrollbar problem
Don't know for sure, but I would have a look at QStyle::pixelMetric() with QStyle::PM_SliderThickness or QStyle::PM_SliderControlThickness.
Re: QScrollArea horizontal scrollbar problem
One can also try horizontalScrollBar()->sizeHint().height().