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?
Forum Updated to NodeBB v4.3 + New Features

Automatically adding scroll bar?

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 1.2k 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.
  • R Offline
    R Offline
    R_Irudezu
    wrote on 27 Dec 2018, 06:24 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
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 27 Dec 2018, 07:03 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 1 Reply Last reply 27 Dec 2018, 07:05
      1
      • M mrjj
        27 Dec 2018, 07:03

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

        R Offline
        R Offline
        R_Irudezu
        wrote on 27 Dec 2018, 07:05 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.

        M 1 Reply Last reply 27 Dec 2018, 07:12
        0
        • R R_Irudezu
          27 Dec 2018, 07:05

          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

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 27 Dec 2018, 07:12 last edited by
          #4

          Hi
          Toolbox gives scrollbars
          alt text

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

          R 1 Reply Last reply 27 Dec 2018, 07:27
          4
          • M mrjj
            27 Dec 2018, 07:12

            Hi
            Toolbox gives scrollbars
            alt text

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

            R Offline
            R Offline
            R_Irudezu
            wrote on 27 Dec 2018, 07:27 last edited by
            #5

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

            Keizoku wa chikaranari.

            M 1 Reply Last reply 27 Dec 2018, 07:28
            0
            • R R_Irudezu
              27 Dec 2018, 07:27

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

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 27 Dec 2018, 07:28 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 1 Reply Last reply 27 Dec 2018, 07:48
              1
              • M mrjj
                27 Dec 2018, 07:28

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

                R Offline
                R Offline
                R_Irudezu
                wrote on 27 Dec 2018, 07:48 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

                1/7

                27 Dec 2018, 06:24

                • Login

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