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 use horizonalscrollbar and verticalscrollbar in dialog,please help anyone
QtWS25 Last Chance

How to use horizonalscrollbar and verticalscrollbar in dialog,please help anyone

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 2.7k 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.
  • K Offline
    K Offline
    karps
    wrote on last edited by
    #1

    Iam having nearlly 50 controls in my dialog(combobox and lineedit,designed using Qt designer 4.7.3).
    In visible area i can see only 7 controls,remaining controls i have to see at run time using scrollbar.How to achieve this?Iam using stackwidget since i need to handle different page with different operations.I looked some of the books but could not find.please help someone

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Anumar
      wrote on last edited by
      #2

      Try to place your QStackWidget into QScrollArea

      1 Reply Last reply
      0
      • K Offline
        K Offline
        karps
        wrote on last edited by
        #3

        I will try to do the method u told.In the mean time Could u please send me a sample program using QScrollarea,Vertical and horizontal scrollbar?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Anumar
          wrote on last edited by
          #4

          Look at "this example":http://qt-project.org/doc/qt-4.7/qscrollarea.html in Qt docs

          1 Reply Last reply
          0
          • K Offline
            K Offline
            karps
            wrote on last edited by
            #5

            Thanks for ur Quick reply. Let me try this

            1 Reply Last reply
            0
            • K Offline
              K Offline
              karps
              wrote on last edited by
              #6

              I tried that example its working,but for my cases its not working.
              i placed the stackwidget inside Qscrollarea,when i move to 2nd page in stackwidget i need the scroll bar.
              Just i tried simple dialog with 10 labels.Steps are

              1. place teh qscrollArea in dialog
              2. then added the stackwidget and placed 10 labels in first page alone
              3. Minimize the dialog so that only 5 labels are visible

              Then in coding i set as ui.scrollarea->setwidget(ui.stackwidget)
              but its not working. what am doing wrong?
              can u please guide me?

              1 Reply Last reply
              0
              • K Offline
                K Offline
                karps
                wrote on last edited by
                #7

                [Solved]...Just i placed the Stackwidget inside QScrollarea,but we need to add layouts then only it will works... Thanks for ur answers

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mlong
                  wrote on last edited by
                  #8

                  Be sure and edit your initial post and add [Solved] to the title. Thanks!

                  Software Engineer
                  My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                  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