I did not try really but this should do the trick.
by the way the rect you define does not seem valid, unless you invert top and bottom (like you scaled view's Y in first post)

Qt Code:
  1. MainWindow::MainWindow(QWidget *parent) :
  2. QMainWindow(parent),
  3. ui(new Ui::MainWindow)
  4. {
  5. ui->setupUi(this);
  6.  
  7. scene = new MyScene(this);
  8. ui->graphicsView->setScene(scene);
  9.  
  10. test = new item();
  11. scene->addItem(test);
  12.  
  13. ui->graphicsView->fitInView(scene->itemsBoundingRect());
  14. }
To copy to clipboard, switch view to plain text mode