首页 > Web开发 > 详细

<qt> QGraphicsSceneFindItemBspTreeVisitor 造成的visit 出错

时间:2014-08-16 17:13:21      阅读:694      评论:0      收藏:0      [点我收藏+]

   在QGraphicsScene上添加2个自定义的Item 的时候 然后移动这2个Item 在删除的时候 出现错误。定位到QGraphicsSceneFindItemBspTree Visitor这个函数上。

    其他的Item都是好的。在代码上也没找到错误。

    google了下 貌似不是自己的原因 是qt本身的一个BUG:

    Crash in QGraphicsSceneBspTree when adding items in response to a mouse press and adjusting them when moving.*>
*>
Resolution: Always call prepareGeometryChange() before changing the item‘s geometry. Otherwise, the scene‘s index will fall out of sync, and the behavior is undefined.*>


*>

    其实就是在移动的时候prepareGeometryChange()这个函数没好好的调用。放在正确的顺序后就没出错了。*>


*>

    原文:http://benlaux.blogspot.kr/2010/07/valgrind1.html*>

<qt> QGraphicsSceneFindItemBspTreeVisitor 造成的visit 出错,布布扣,bubuko.com

<qt> QGraphicsSceneFindItemBspTreeVisitor 造成的visit 出错

原文:http://cherryliuhai.blog.51cto.com/7510250/1541034

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!