How to adjust scroll area as per widgets?

  • I am having one 'checkable' group box inside scroll area. when I toggle the groupbox, the items inside it are 'setVisible(false)' thus the groupbox shrinks, but the scroll area does not shrink, it remains the same. I want to reduce the scroll area, when group box is toggled. How should I do it??

  • Moderators

    have you set QScrollArea's widgetResizeable property set to true?
    If not it should be enough to resize the QScrollArea's content widget to it's sizeHint.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.