将对其方式设置为左上角: this->setAlignment(Qt::AlignLeft|Qt::AlignTop); 备注:QGraphicsView::setAlignment(Qt::Alignment alignment);