永发信息网

Qt中坐标系的单位长度是多少

答案:2  悬赏:70  手机版
解决时间 2021-01-25 17:39
Qt中坐标系的单位长度是多少
最佳答案
可以使用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.
全部回答
重载qwidget的painevent()函数. 在painevent函数中可以使用translate,rotate等函数转换painter的坐标系,使绘图变得跟简单. 然后用lineto()函数画线.如果你想画一个三角型箭头的话就最好用drawpath(). 可以用drawtext()来画出文字.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
你好,请问下载什么软件或网站,可以寻找以前
吉林省长春市南关区艳华托老院地址在什么地方
爱家婚庆怎么去啊,我要去那办事
in reach是什么意思呀?????急……
寻与 ヤ暮浴ゞ晨曦 匹配的情侣网名
8.8x101-8.8怎么用脱式计算
现在,守护甜心到底出到第几集了
吉林省长春市南关区光盐福利院地址好找么,我
对于任意的整数a、b,规定a△b=(ab)3-(a2
甲胺磷的价格是多少?
破腹产坐月子突然胃疼是怎么回事啊?该怎么办
艾菲尔高端婚礼会馆地址在什么地方,我要处理
从漳州到珠海自驾游怎么玩效果最好
由农业社会向工业社会过渡,即实现工业化,是
幸福可以复制吗
推荐资讯
为什么我写字的时候手会感觉很累?
根据外商直接投资法律制度的规定,下列选项中
13岁,一个人喝一瓶红酒,一点醉意都没有。酒
Win10可以用后期软件吗
为什么VIVO手机菜单中进行高级设置是灰色的
喝了啤酒能吃感冒药吗会有什么不良反应
怎样学好医学生物化学,学医不能马虎啊!
m6t-bass power amplifier低音炮怎么连接蓝牙
“田忌赛马”中田忌听了谁的建议后赢得了赛马
用路由器上网影响网速吗
模仿《小屋》,以“母亲”为话题写一首短诗。
绿豆汤能解药吗
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?