我对QGraphicsView有疑问。如果我使用坐标:(0,0,200,200)放置场景,场景从左边的顶部e 9px减少9px,如图像所示:
QGraphicsScene *myScene= new QGraphicsScene();
CustomAnimation *ca = new CustomAnimation(); //inherits from QGraphicsWidget
myScene->addItem(ca);
myScene->setSceneRect(0,0,200,200);
ui->gfx_animation->setScene(myScene);
ui->gfx_animation->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
ui->gfx_animation->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
但如果我使用setSceneRect(9,9,200,200),则场景正确定位。有什么问题?