View Full Version : How to use verticalScrollBar? [SOLVED]

19th July 2011, 04:51
I added scrollArea and verticalScrollBar but not functioning as I expected.
Need code for it. What should I set? Value?
I want the scrollBar to display unseen part of the page...
Need help! >.<

Santosh Reddy
19th July 2011, 05:07
Just add you widget to the QScrollArea, and that's all you are done. vertical / horizontal scroll bars appear as and when needed. The basic example from documentation is

QLabel *imageLabel = new QLabel; //replace this with your widget
QImage image("happyguy.png");

scrollArea = new QScrollArea;
scrollArea->setWidget(imageLabel);//set your widget on to QScrollArea

19th July 2011, 06:09
tried it but nothing is display..
Is there a code example for QT Designer?

Santosh Reddy
19th July 2011, 06:15
here you go 6683

19th July 2011, 06:33
here you go 6683

thanks that works !;)