首页| 论坛| 消息

回复: 点击QGraphicsItem边界才可以移动
#6 回 maxlogo 的帖子 [laijunguang 08-17 08:14]
maxlogo:重写shape即可,item的鼠标判断是根据shape来判断的 (2018-08-16 16:01) 
嗯嗯,好的,这个是可以的,重写shape,将自己要的形状增加至QPainterPath中,后再用QPainterPathStroker类提取出边界,返回至boundingRect中

<< 1 2 >> (2/2)

回复 发表
主题 版块