PDA

View Full Version : ScrollBar problem



kamlmish
19th January 2011, 06:59
Hi
I have a small problem in the vertical scrollbar

My issue is that , I have a QListView and QScrollbar in my mainwindow. The ListView is filled up with images ,
I need to scroll the images in the listview using the scrollbar.

nish
19th January 2011, 07:05
you have a separate scrollbar instead of the default one provided by QListView? Can you explain more.

kamlmish
19th January 2011, 07:57
I have attached the screenshot for the same.
In the screenshot , you can see the images getting displayed in LISTVIEW, but I need to display the vertical scrollbar besides the LISTVIEW
How can I do it ?

nish
19th January 2011, 08:33
what about listview->setVerticalScrollbarPolicy( Always show )?

kamlmish
19th January 2011, 08:45
That doesnt work

nish
19th January 2011, 09:29
give a minimal compilable program that reproduces the problem.

kamlmish
19th January 2011, 10:47
Solved
I used
QScrollArea* scrollarea = new QScrollArea;
scrollArea->setWidget(this);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOf f);