Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Wanting to connect a slider to a scroll area which contains buttons?
Forum Updated to NodeBB v4.3 + New Features

Wanting to connect a slider to a scroll area which contains buttons?

Scheduled Pinned Locked Moved Qt Creator and other tools
32 Posts 3 Posters 13.6k 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.
  • T Offline
    T Offline
    theblizzfreak
    wrote on last edited by
    #8

    im sorry how would one go about doing that?? my guess is make a knew project and create a slider in the Designer and scroll area with a button and then give you the UI file?? :)

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #9

      hold back not too fast ;-) , i will first look into the file you sent at the same time i asked for the minimal example.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • T Offline
        T Offline
        theblizzfreak
        wrote on last edited by
        #10

        ah HA :D typical situwations :P

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by
          #11

          ok, I got it.

          It's easy to solve you need to use layouts.
          "Here is a good explanation on how to use them :":http://doc.qt.nokia.com/4.7/layout.html

          i have made a simple ui file you can look into. A picture tells more than 1000 words.... ;)
          http://dl.dropbox.com/u/33544011/mainwindow.ui

          If you have any more specific questions, feel free to ask.

          Qt Certified Specialist
          www.edalsolutions.be

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #12

            There is also a slider example which may provide you already at least some of the logics you need.
            "Sliders Example ":http://doc.qt.nokia.com/4.7/widgets-sliders.html

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • EddyE Offline
              EddyE Offline
              Eddy
              wrote on last edited by
              #13

              Hi koahnig,

              theblizzfreak just needs a QScrollarea with widgets in a layout.

              @theblizzfreak
              i suggest to look into the sliders example later on, which is more detailed and offers a lot to learn about signal and slots also.

              Qt Certified Specialist
              www.edalsolutions.be

              1 Reply Last reply
              0
              • T Offline
                T Offline
                theblizzfreak
                wrote on last edited by
                #14

                okay so how does one put a layout into a application and how does one structure it ;)

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  theblizzfreak
                  wrote on last edited by
                  #15

                  Oh okay thanks there Eddy :) helped me alot brb ill see if i can get it too work

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    theblizzfreak
                    wrote on last edited by
                    #16

                    okay im totally stumped i dont even know where to start do i make a class? or use the QT Designer? where do i put the class,etc

                    1 Reply Last reply
                    0
                    • EddyE Offline
                      EddyE Offline
                      Eddy
                      wrote on last edited by
                      #17

                      [quote author="theblizzfreak" date="1310929596"]okay so how does one put a layout into a application and how does one structure it ;)[/quote]

                      In Qt Designer there are buttons for that.
                      select the widgets you want in a layout and then click on one of the layout buttons.
                      "A Quick Start to Qt Designer":http://developer.qt.nokia.com/doc/qt-4.7/designer-quick-start.html

                      you can use the ui file i provided and replace it with the one you got by using the wizard to make a QMainwindow based program in Qt Creator.

                      Qt Certified Specialist
                      www.edalsolutions.be

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        theblizzfreak
                        wrote on last edited by
                        #18

                        okay i have my layout and my button in my layout i have my slider :) and i also have a scroll area under my layout : ) now what do i do? :D

                        1 Reply Last reply
                        0
                        • EddyE Offline
                          EddyE Offline
                          Eddy
                          wrote on last edited by
                          #19

                          Isn't that what you asked for? What else do you want to accomplish?

                          Qt Certified Specialist
                          www.edalsolutions.be

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            theblizzfreak
                            wrote on last edited by
                            #20

                            haha np ill explain again basically i want a slider that makes my ScrollArea Window with buttons inside move up and down based on the slider :)

                            like the scroll bar on a webbrowser where you can go up and down the webpage but for buttons in an application :) thanks in advance if you need some visual examples ill get some pictures

                            1 Reply Last reply
                            0
                            • EddyE Offline
                              EddyE Offline
                              Eddy
                              wrote on last edited by
                              #21

                              The ui example i made for you has a scrollbar if the dialog is too small for all the buttons. You can scroll down and up.

                              I have 3 buttons in a scrollarea in a layout.

                              If that's not what you want please give us a picture.

                              Qt Certified Specialist
                              www.edalsolutions.be

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                theblizzfreak
                                wrote on last edited by
                                #22

                                how do i give the slider an action to make it move the buttons up or down on the vertical layout ?

                                i tried using the Signal and Slots editor but it dont make any sense to me accept that i can connect things together

                                1 Reply Last reply
                                0
                                • EddyE Offline
                                  EddyE Offline
                                  Eddy
                                  wrote on last edited by
                                  #23

                                  Have you tried my example?

                                  Qt Certified Specialist
                                  www.edalsolutions.be

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    theblizzfreak
                                    wrote on last edited by
                                    #24

                                    yes :) iv looked at it but it all looks the same in terms of how i structure the gui ? what am i missing? this QT is very strange to work with

                                    1 Reply Last reply
                                    0
                                    • EddyE Offline
                                      EddyE Offline
                                      Eddy
                                      wrote on last edited by
                                      #25

                                      [quote author="theblizzfreak" date="1310934733"]yes :) it all looks the same in terms of how i structure the gui ?[/quote]

                                      i don't understand this. Can you explain more?

                                      Edit : please don't change your post afterwards. It makes things even more complicated to follow. Use the edit button on the right like I did.

                                      Qt Certified Specialist
                                      www.edalsolutions.be

                                      1 Reply Last reply
                                      0
                                      • T Offline
                                        T Offline
                                        theblizzfreak
                                        wrote on last edited by
                                        #26

                                        when i look at your example and my example they look exactly the same the only difference is yours actually moves the buttons and i dont know how to do that? please can you tell me how you did it exactly and also tell me how you figured that out please thanks! :)

                                        1 Reply Last reply
                                        0
                                        • EddyE Offline
                                          EddyE Offline
                                          Eddy
                                          wrote on last edited by
                                          #27

                                          You can see the structure of what i did on the right in Qt Designer.
                                          I explained where you could find the buttons to add layouts, i even gave you a link to the docs where the details are explained. I suggest you go back in time and read all the posts in a chronological order. Follow the suggestions made like reading the tutorials, wiki or whatever.
                                          If you still feel lost i strongly advise you to read a good book about Qt to get the overview you need to understand all the details. "Here is a good book :":http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip.
                                          Read the first chapters and you will feel much comfortable using Qt.

                                          Qt Certified Specialist
                                          www.edalsolutions.be

                                          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