Is possible to have a widget that doesnt scroll in a QScrollArea?
Unsolved
General and Desktop
-
Given this example:
Suppose A and B are
QWidgets
Is it possible to keep everything starting from B static when the
QScrollArea
widget is scrolled?The
QScrollArea
occupies the entire GUI, B is inside it to let the verticalScrollBar
closer 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().