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. How to prevent QGraphicsView from re centering every time an item is added to the scene
Forum Updated to NodeBB v4.3 + New Features

How to prevent QGraphicsView from re centering every time an item is added to the scene

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 755 Views 1 Watching
  • 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
    MadMan27
    wrote on last edited by
    #1

    Normally, when you add a new item to the scene, the view moves to the very center of all the items on the scene. How can I prevent this? In other words, I don't want the view to change at all when a new item is added to the scene?

    Thanks in advance!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Asperamanca
      wrote on last edited by
      #2

      Maybe this is connected to the sceneRect: Unless you set the sceneRect explicitly, it is automatically expanded every time you add an item.

      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