mumush
mumush

Reputation: 670

Make QVBoxLayout scrollable inside a QScrollArea

I have a QVBoxLayout which has content dynamically added to it. I simply want to make that layout scrollable as the content overflows.

What is the correct way to achieve this in Qt Designer, or do I need code as well?

Upvotes: 1

Views: 874

Answers (1)

mumush
mumush

Reputation: 670

In Qt Designer:

  • Create a QScrollArea
  • Drag your existing QVBoxLayout into the QScrollArea.
  • Right-click inside the QScrollArea (not inside the layout), and select "Apply Layout".
  • Choose a layout (I chose a vertical layout).

Upvotes: 1

Related Questions