Important: Please read the Qt Code of Conduct -

QScrollarea and a widget that is in one position all the time

  • So say I have a scroll area widget

    and inside that widget I have a widget which has a layout which as like 100 other widgets added into that layout. but the first widget that I added into that layout is "special". I want that first widget to always be seen when scrolling the scroll area (kinda like in css position: fixed;). How?

  • Lifetime Qt Champion


    Don't put that widget in the same layout then. You can get some inspiration from the Frozen Column Example. The idea is that you put your "floating" widget at the position you want and the rest will move under it.

    Depending on the use of that widget, you could also simply have a layout with that widget on top and your QScrollArea just under.

Log in to reply