saurabhsood91
saurabhsood91

Reputation: 489

Adding a scrollbar to a custom QWidget

I have a custom QWidget A, which contains another custom QWidget B. I want to add a scrollbar to the Qwidget B. I tried adding a QScrollArea, but it covers the entire window of QWidget A. How do I ensure that the scrollbar is for only QWidget B?

Upvotes: 1

Views: 1865

Answers (1)

laurent
laurent

Reputation: 90776

First replace QWidget B with the QScrollArea and set it up so that it is where you want it to be. Then simple add QWidget B to the QScrollArea.

Upvotes: 2

Related Questions