How to use horizonalscrollbar and verticalscrollbar in dialog,please help anyone
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
Try to place your QStackWidget into QScrollArea
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?
Look at "this example":http://qt-project.org/doc/qt-4.7/qscrollarea.html in Qt docs
Thanks for ur Quick reply. Let me try this
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
- place teh qscrollArea in dialog
- then added the stackwidget and placed 10 labels in first page alone
- 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?
[Solved]...Just i placed the Stackwidget inside QScrollarea,but we need to add layouts then only it will works... Thanks for ur answers
Be sure and edit your initial post and add [Solved] to the title. Thanks!