I\'ve been pulling my hair out with this one for hours. There\'s a thread here about it, but nothing seems to be working. QGraphicsView::rect() will return the width and hei
You can do what you've done, or use the mapToScene() functions. You can't count on the resulting scene "rectangle" being a rectangle, however, because the scene might be rotated or sheared in the view, resulting in a general polygon when mapped to the scene.
If your application never does such things, of course, you're free to assume that a rectangle is always appropriate.