Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. How to move QGraphicsView in a QGraphicsScene
Forum Update on Monday, May 27th 2025

How to move QGraphicsView in a QGraphicsScene

Scheduled Pinned Locked Moved Unsolved Game Development
2 Posts 2 Posters 637 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.
  • M Offline
    M Offline
    Morfio
    wrote on last edited by
    #1

    Hello everybody,

    I don't understand it. I have a large QGraphicsScene, maybe 3000x3000px and I have a QGraphicsView with 1000x1000px. How do I show position 2000x2000 of the scene in the graphics view?

    I can use horizontalScrollbar()->scroll(1000, 1000), I can use centerOn, I can change the sceneRect(1000, 1000....). But I don't know the right way.

    Does anybody know how to do this?

    Thank you

    Morfio

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      All the solutions you listed are correct.

      (Z(:^

      1 Reply Last reply
      2

      • Login

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