scene->setSceneRect(QRectF(MIN_X, 0, MAX_X, 100)); ui->graphicsView->setFixedSize(640,640); ui->graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);