Wanting to connect a slider to a scroll area which contains buttons?
-
hello i really wished i didnt have to come ask for help everytime i got stuck but because the documentation is not exactly precise i can not do it any other way so i ask how in the one of mothers heck! :D
does one connect 1 slider to a scroll area with buttons and also how do i make the scroll area move with the slider position? and also explain how you figured it out so i can learn from you thanks! :)
The QT Development Kit Rocks OtherWise! :D
-
using the lovely designer :D mostly because i love to focus more on creative problem solving then the hard tedious kind :D but that dont mean i dont like abit of coding :D love both anyways yes im using the UI Designer :)
-
thats alot to look at are you shore?
-
heres a link to download it http://www.2shared.com/file/sEd0hUOH/mainwindow.html
-
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?? :)
-
ah HA :D typical situwations :P
-
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.htmli have made a simple ui file you can look into. A picture tells more than 1000 words.... ;)
http://dl.dropbox.com/u/33544011/mainwindow.uiIf you have any more specific questions, feel free to ask.
-
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 -
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. -
okay so how does one put a layout into a application and how does one structure it ;)
-
Oh okay thanks there Eddy :) helped me alot brb ill see if i can get it too work
-
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
-
[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.htmlyou 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.
-
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
-
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