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. Problem setting the scene rectangle
Forum Updated to NodeBB v4.3 + New Features

Problem setting the scene rectangle

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 84 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
    james b-s
    wrote 29 days ago last edited by
    #1

    The first trace statement shows that I am setting the scene rectangle to (-50, -29, 628, 176).
    The second trace statement shows that the scene rectangle is (0, 0, 0, 0).
    sceneRect never returns anything other than (0, 0, 0, 0) for me.

    Any suggestions?

    void MyQGraphicsView::SetSize(const QRect& size)
    {
      Trace("setting view size to (%d, %d, %d, %d)", size.x(), size.y(), size.width(), size.height());
    
      setSceneRect(size);
    
      Trace("***** view size == (%d, %d, %d, %d)", sceneRect().x(), sceneRect().y(), sceneRect().width(), sceneRect().height());
    }
    
    1 Reply Last reply
    0
    • J Offline
      J Offline
      james b-s
      wrote 29 days ago last edited by
      #2

      nvm. It looks like the trace format was wrong

      1 Reply Last reply
      0
      • J james b-s has marked this topic as solved 29 days ago

      2/2

      13 May 2025, 16:35

      • Login

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