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

Problem setting the scene rectangle

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 43 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 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 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

      • Login

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