Qt 6.11 is out! See what's new in the release
blog
Is possible to have a widget that doesnt scroll in a QScrollArea?
-
Given this example:
Suppose A and B are
QWidgets

Is it possible to keep everything starting from B static when the
QScrollAreawidget is scrolled?The
QScrollAreaoccupies the entire GUI, B is inside it to let the verticalScrollBarcloser to the right border of the GUI, or it would look like this:
What I can do in this case?
-
yes, but it's not easy. One way is to trigger a move() of the static widget any time the scroll region changes.
The other way involves layered layout managers, and transparency.
-
Place a separate QScrollBar on the right side. Register it via QAbstractScrollArea::setVerticalScrollBar().