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. QGraphicsScene::setSceneRect() does not update immediately
Forum Updated to NodeBB v4.3 + New Features

QGraphicsScene::setSceneRect() does not update immediately

Scheduled Pinned Locked Moved Solved General and Desktop
qgraphicsscenescenerect
2 Posts 1 Posters 1.3k 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.
  • J Offline
    J Offline
    jj382
    wrote on last edited by jj382
    #1

    Setting scene rectangle using QGraphicsScene::setSceneRect() ocasionally does not result in change of the scene until after a resize event takes place.

    Questions:

    1. Why is this the case?
    2. How can I force the QGraphicsScene to respect the scene assigned to it immediately
    1 Reply Last reply
    0
    • J Offline
      J Offline
      jj382
      wrote on last edited by
      #2

      (One?) Solution is to call QGraphicsView( QRectF ) with QRectF obtained from QGraphicsScene::sceneRect() immediately after assigning a new scene rectangle.

      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