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. Adding in vertical bar
Qt 6.11 is out! See what's new in the release blog

Adding in vertical bar

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.1k Views 2 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.
  • O Offline
    O Offline
    Omni_Philm
    wrote on last edited by
    #1

    Hello all,

    I have a canvas with a set size. The amount of widgets that I would like to add to the canvas will exceed the size that the canvas can hold.

    I was thinking that I could implement a scrolling feature where there would be a vertical side bar and the user scrolls with the sidebar to gain access to the other widgets. I have been exploring Qt for this feature but I haven't found anything yet.

    Does any know if I can do this with Qt?

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

      Hi,

      Are you thinking about something like QScrollArea ?

      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
      1
      • O Offline
        O Offline
        Omni_Philm
        wrote on last edited by
        #3

        That looks like a possibility. Looking at the description, I can only associate 1 widget to the scroll area. Can I still use the QScrollArea with multiple widgets? Or is there a widget that groups multiple widgets into 1?

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          You can add as many widgets to the scroll area as you want.
          You just add it as children to the first widget using a layout.
          so the one you set via setWidget is the main widget but it can contain any
          number of other widgets and the scroll area will handle the scrolling.

          1 Reply Last reply
          3
          • O Offline
            O Offline
            Omni_Philm
            wrote on last edited by
            #5

            Great,

            thank you

            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