可以使用setSceneRect()设置QGraphicsScene的大小。如果不设置,则默认为scene中包含所有子元素的边界区域( itemsBoundingRect()函数的
返回值
)。
更详细的说明参看QGraphicsScene的文档,讲解很详细,看下面这段:
The scene's bounding rect is set by calling setSceneRect(). Items can be placed at any position on the scene, and the size of the scene is by default unlimited. The scene rect is used only for internal bookkeeping, maintaining the scene's item index. If the scene rect is unset, QGraphicsScene will use the bounding area of all items, as returned by itemsBoundingRect(), as the scene rect. However, itemsBoundingRect() is a relatively time consuming function, as it operates by collecting positional information for every item on the scene. Because of this, you should always set the scene rect when operating on large scenes.
地推就是区别于线上推广的线下推广,里面又细分BC端,想了解更多细分信息可以找汇地推,成功案例很多,很多大品牌都找到合作。我们来说如果要推广一款APP,汇地推就会利用整合好的资源去做地推,目前已和全国各个场景物业达成合作关系。通过场景资源去做...
点击进入详情页
本回答由
广州科汇文化传媒有限公司
提供