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. How to program QScrollArea thorugh QtCreator
QtWS25 Last Chance

How to program QScrollArea thorugh QtCreator

Scheduled Pinned Locked Moved Solved General and Desktop
qscrollareaqtcreatorqlayout
4 Posts 2 Posters 1.9k Views
  • 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.
  • R Offline
    R Offline
    Rohith
    wrote on 30 Jun 2017, 12:29 last edited by
    #1

    Hi i am trying to make an application which will have QStackedWidget on top of Widget and i have taken a QScrollArea and added multiple groupboxes to a verticalLayout but i was unable to see the scrollbar for QScrollArea. Even if i am increasing the number of groupboxes the groupboxes are adjusting on top of scrollarea but i am unable to see the scrollbar for scrollArea

    Here is my creation hierarchy and application output

    Please go through the below screenshots

    http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-06-3017-43-29.png

    http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-06-3017-43-41.png

    http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-06-3017-44-23.png

    Regard's
    Rohith.G

    M 1 Reply Last reply 1 Jul 2017, 08:50
    0
    • R Rohith
      30 Jun 2017, 12:29

      Hi i am trying to make an application which will have QStackedWidget on top of Widget and i have taken a QScrollArea and added multiple groupboxes to a verticalLayout but i was unable to see the scrollbar for QScrollArea. Even if i am increasing the number of groupboxes the groupboxes are adjusting on top of scrollarea but i am unable to see the scrollbar for scrollArea

      Here is my creation hierarchy and application output

      Please go through the below screenshots

      http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-06-3017-43-29.png

      http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-06-3017-43-41.png

      http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-06-3017-44-23.png

      Regard's
      Rohith.G

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 1 Jul 2017, 08:50 last edited by mrjj 7 Jan 2017, 08:54
      #2

      @Rohith
      Hi

      The layout you have used, is that one you dragged from the widget box ?
      Normally, you place one groupbox, right click and use the layout menu to add the layout.
      Then add the rest of the groupboxes. (or add all, then right click and apply layout)

      Those floating layouts (red) are to insert into another layout.

      The reason no scrollbars come (it seems ) is that there is no minimum height for the group box.
      so when you add a new the others are just compressed more.

      Try setting a minimum height / add other widgets to them so they cant be small as a line
      alt text

      R 1 Reply Last reply 1 Jul 2017, 10:19
      2
      • M mrjj
        1 Jul 2017, 08:50

        @Rohith
        Hi

        The layout you have used, is that one you dragged from the widget box ?
        Normally, you place one groupbox, right click and use the layout menu to add the layout.
        Then add the rest of the groupboxes. (or add all, then right click and apply layout)

        Those floating layouts (red) are to insert into another layout.

        The reason no scrollbars come (it seems ) is that there is no minimum height for the group box.
        so when you add a new the others are just compressed more.

        Try setting a minimum height / add other widgets to them so they cant be small as a line
        alt text

        R Offline
        R Offline
        Rohith
        wrote on 1 Jul 2017, 10:19 last edited by
        #3

        @mrjj

        Thanks for replying i have done what you have said, but the layout is not getting added to the scrollAreaWidgetContents but it is adding seperately. You can check the below screen shot

        Before Adding Layout:
        http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-07-0115-30-14.png

        After Adding Layout:
        http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-07-0115-45-58.png

        How i want to add through QtCreator
        http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-07-0115-30-38.png

        Regard's,
        Rohith.G

        M 1 Reply Last reply 1 Jul 2017, 15:05
        0
        • R Rohith
          1 Jul 2017, 10:19

          @mrjj

          Thanks for replying i have done what you have said, but the layout is not getting added to the scrollAreaWidgetContents but it is adding seperately. You can check the below screen shot

          Before Adding Layout:
          http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-07-0115-30-14.png

          After Adding Layout:
          http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-07-0115-45-58.png

          How i want to add through QtCreator
          http://img4.imagetitan.com/img.php?image=16_screenshotfrom2017-07-0115-30-38.png

          Regard's,
          Rohith.G

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 1 Jul 2017, 15:05 last edited by
          #4

          @Rohith
          Hi
          Im not sure what goes wrong.
          I guess you are still not using the RIGHT click layout menu ?
          Do not drag layouts from left box.

          Please see this video.
          https://www.dropbox.com/s/t3icclcqb446jkm/scroll.mp4?dl=0

          1 Reply Last reply
          0

          3/4

          1 Jul 2017, 10:19

          • Login

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