[Qt-interest] Scrollbars

phil prentice philp.cheer at talktalk.net
Sat Apr 25 23:22:43 CEST 2009


I have a subclass of a QListView.  The horizontal scroll bar works well. If I 
add items the scroll bar updates as I expect.  However I would like to 
be-able to scroll the items I have in the list right off of the visible area 
of the widget. Sounds simple and probably is...but I cant make it work.

So for example if I have six items being displayed in my horizontal list then 
I would like to be-able to scroll right and move all six items left off of 
the visible display, so my widget will display no items.  I can then add 6 
new items to the end of the list.  So the maximum value should be the max 
value of the last item in the list + the length of the horizontal displayable 
view.

I tryed making calls to horizontalScrollBar()->setMaximum(....); to change the 
maximum value of the scroll list..but this did not seem to have any affect.  
I think part of my problem is knowing were I should be making this call to 
change the range of the scrollable area?

Is there any good examples of the type of thing I want to do...or am I missing 
something obvious here?

Thanks

Phil



More information about the Qt-interest-old mailing list