Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Achieve the Microsoft Excel scroll effect in a QGraphicsScene
Forum Updated to NodeBB v4.3 + New Features

Achieve the Microsoft Excel scroll effect in a QGraphicsScene

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 347 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • johnratiusJ Offline
    johnratiusJ Offline
    johnratius
    wrote on last edited by
    #1

    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?

    JonBJ 1 Reply Last reply
    0
    • johnratiusJ johnratius

      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?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @johnratius
      I don't have any code for you, and I don't know if there is anything special about QGraphicsScene, but I assume you only wanted the approach, right?

      I presume:

      1. You react to the user scrollling, either paging or dragging as necessary.

      2. 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.

      ?

      johnratiusJ 1 Reply Last reply
      1
      • JonBJ JonB

        @johnratius
        I don't have any code for you, and I don't know if there is anything special about QGraphicsScene, but I assume you only wanted the approach, right?

        I presume:

        1. You react to the user scrollling, either paging or dragging as necessary.

        2. 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.

        ?

        johnratiusJ Offline
        johnratiusJ Offline
        johnratius
        wrote on last edited by
        #3

        @JonB Yes, I am asking for an approach, and this or other approaches will work well without affecting performance greatly. I'll take a look at implementing this, thanks.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved