Hello, and thanks for reading.
Consider a class Foo which is something likeQt Code:
setLayout (my_layout); } void Foo :: bar () { my_layout -> addWidget (new SomeWidget()); }To copy to clipboard, switch view to plain text mode
If Foo inherits from QWidget then it behaves as expected: the height increases to accomodate the contens every time bar() is called.
If this grows to big I need a vertical scrollbar. However, if Foo inherits from QScrollArea then it does not resize to fit the new contents; rather, the new widgets are squashed together. Ironically, this makes the scrollbar redundant.
How to I make Foo stack the child widgets correctly as in the non-scrolling version?
Thanks
Bookmarks