Reputation: 8292
I have a QDialog like this:
I have added a QScrollArea to this QDialog like this:
What I want is When the user expands QDialog , the QScrollArea should also expand with it.
I have tried several properties of QScrollArea
like verticalScrollBarPolicy
horizontalScrollBarPolicy
, sizeAdjustPolicy
, but nothing seems to work.
Can someone suggest how to accomplish this?
Upvotes: 1
Views: 360
Reputation: 98505
For the dialog to resize its child widgets, it must have a layout. Set a layout on the dialog. Do not change any of QScrollArea
's properties: they only affect the area itself and its children, and have nothing to do with how the parent widget (the dialog) might manage the scroll area's geometry()
.
Upvotes: 1