QGraphicsScene 和定位

2 投票
2 回答
1124 浏览
提问于 2025-04-15 16:02

如何把QGraphicsScene的(0,0)点放到QGraphicsView的左上角?

2 个回答

0

QGraphicsScene 会填满整个 QGraphicsView,但是你可以使用 setSceneRect 这个函数来选择你想在 QGraphicsView 中看到的 QGraphicsScene 的部分。

1

试试在 QGraphicsView 上使用 setCenterOn(0,0) 呢?

撰写回答