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 -
Look at "this example":http://qt-project.org/doc/qt-4.7/qscrollarea.html in Qt docs
-
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?