Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved QGraphicsScene::setSceneRect() does not update immediately

    General and Desktop
    qgraphicsscene scenerect
    1
    2
    958
    Loading More Posts
    • 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
      jj382 last edited by jj382

      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 Reply Quote 0
      • J
        jj382 last edited by

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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post