Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QScrollarea and a widget that is in one position all the time
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 919 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fuchsiaff
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved