hi,
i have a custom drawn widget, that has a horizontal scrollbar. Here
http://doc-snapshot.qt-project.org/4.8/qscrollbar.html
is a very nice description how to choose min/max values, but because i am incompetent, i can get it to work.
I have these values:
x = total number of rows
y = exposed number of rows
and need these:
min, max, singelstep, pagestep
I would say three of them are clear:
min = 0
singlestep = 1
pagestep = y
choosing a max value is the challenge here.
if we just do
max = x
then that works OK, but if we scroll down all the way, the screen will be "empty", because the last line to display is above the visible area.
First thing that comes to mind is doing max = x-y. Then only half the screen is empty when we scroll full down. Not sure why, though.
This shouldnt be too hard, but my brain got stuck somewhere.
any help i appreciated.
Bookmarks