我需要获取设置了QGraphicsItem::ItemIgnoresTransformations标志的QGraphicsItem的边界框(在场景空间中)。 根据文档,您需要使用QGraphicsItem::deviceTransform()来做到这一点。我尝试这样做: // Get the viewport => scene transform
vp_trans = view.viewport
我想用QGraphicsView编写一个资产浏览器。这与使用QGraphicsView和QGraphicsItems的例子有点不同,因为我只想要一个滚动条,并且希望项目在视口大小改变时自动移动。例如,当视口宽度足够大,以显示4个asssets,它们应显示这样的: aaaa
aaaa
aa
但是当视口收缩,并且只能包含3成一排,它应该这样显示它们: aaa
aaa
aaa
a
我不
我有一个应用程序显示使用QGraphicsScene对象的图的编辑器。我想创建同一个对话框的只读版本,但有能力让用户同时看到两者。 SimScene* pScene1 = new SimScene(model); // adds model to scene
SimScene* pScene2 = new SimScene(model); // adds model to scene
QG