Is there a way to set the width of a QScrollArea
so that a horizontal scrollbar is not needed? I know I can hide horizontal scrollbar by setting it's policy to always off. However, I want to make the QScrollArea
large enough to not need it.
I'm currently somewhat doing this by using scrollbar.setFixedWidth()
. Is there a better way, with something like scrollbar.setSizetoContents()
or something similar?
As a side note, what is the best way to get the maximum width of all the widgets in a layout anyway?