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. Automatically adding scroll bar?
QtWS25 Last Chance

Automatically adding scroll bar?

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 1.1k 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_IrudezuR Offline
    R_IrudezuR Offline
    R_Irudezu
    wrote on last edited by R_Irudezu
    #1

    I have two seperate widgets. First has QGridLayout and second one has QVBoxLayout.
    In the runtime, i'm creating QFrames in both two widgets. When QFrames created too much, first widget (which has qgridlayout) automatically get e vertical scrollbar but second widget is not. What's the problem here? What should i do?

    Keizoku wa chikaranari.

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

      Hi
      Are you sure the GridLayout is not in a QScrollArea ?
      As far as I know, Layouts dont have scrollbars.

      R_IrudezuR 1 Reply Last reply
      1
      • mrjjM mrjj

        Hi
        Are you sure the GridLayout is not in a QScrollArea ?
        As far as I know, Layouts dont have scrollbars.

        R_IrudezuR Offline
        R_IrudezuR Offline
        R_Irudezu
        wrote on last edited by R_Irudezu
        #3

        Mr. @mrjj I am pretty sure. I am setting layouts in the runtime. But in designer, first widget which will have qgridlayout is in a QToolBox and the second widget which will have qvboxlayout is in a QStackedWidget. I am putting a screenshot to here:

        0_1545894424767_xd.PNG

        above image represents second widget and just like you see, created QFrames are not shown like i want but first widget is okay, if more QFrames created: a vertical scrollbar automatically adds

        Keizoku wa chikaranari.

        mrjjM 1 Reply Last reply
        0
        • R_IrudezuR R_Irudezu

          Mr. @mrjj I am pretty sure. I am setting layouts in the runtime. But in designer, first widget which will have qgridlayout is in a QToolBox and the second widget which will have qvboxlayout is in a QStackedWidget. I am putting a screenshot to here:

          0_1545894424767_xd.PNG

          above image represents second widget and just like you see, created QFrames are not shown like i want but first widget is okay, if more QFrames created: a vertical scrollbar automatically adds

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Toolbox gives scrollbars
          alt text

          So you have to use QScrollArea (inside QStackedWidget) to get scrollbar.

          R_IrudezuR 1 Reply Last reply
          4
          • mrjjM mrjj

            Hi
            Toolbox gives scrollbars
            alt text

            So you have to use QScrollArea (inside QStackedWidget) to get scrollbar.

            R_IrudezuR Offline
            R_IrudezuR Offline
            R_Irudezu
            wrote on last edited by
            #5

            @mrjj so the cause of this issue is using different parents

            Keizoku wa chikaranari.

            mrjjM 1 Reply Last reply
            0
            • R_IrudezuR R_Irudezu

              @mrjj so the cause of this issue is using different parents

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              @R_Irudezu
              Well yes you can say that. (its more like different containers )
              The QStackedWidget does not automatically add scrollbars, but QToolBox does.

              R_IrudezuR 1 Reply Last reply
              1
              • mrjjM mrjj

                @R_Irudezu
                Well yes you can say that. (its more like different containers )
                The QStackedWidget does not automatically add scrollbars, but QToolBox does.

                R_IrudezuR Offline
                R_IrudezuR Offline
                R_Irudezu
                wrote on last edited by
                #7

                @mrjj Yes you were right, now it's ok, i need to use QToolBox instead of QWidget. Thanks for help :)

                Keizoku wa chikaranari.

                1 Reply Last reply
                3

                • Login

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