Achieve the Microsoft Excel scroll effect in a QGraphicsScene
-
How can I scroll my QGraphicsScene like Microsoft Excel without setting a max size?
In Excel, the Scroll Bar appears large, and you can only scroll down a little. As you scroll down, the scroll bar shrinks and you scroll endlessly down. I would like my QGraphicsScene to do this. At first, it will appear you can only scroll down a little, but as you scroll down, the size increases. Can I do this and keep my performance of my Scene? -
@johnratius
I don't have any code for you, and I don't know if there is anything special aboutQGraphicsScene
, but I assume you only wanted the approach, right?I presume:
-
You react to the user scrollling, either paging or dragging as necessary.
-
In the handler, you increase the maximum range/limit of the scrollbar. You make the
QGraphicsScene
, or the view, larger, if that's appropriate.
That way the scroll button will get smaller in proportion to the newly increased size.
?
-