Chinaunix首页 | 论坛 | 博客
  • 博客访问: 294934
  • 博文数量: 78
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 572
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-26 09:59
文章分类

全部博文(78)

文章存档

2015年(8)

2014年(70)

我的朋友

分类: 嵌入式

2014-06-20 20:50:48

错误代码:
no matching function for call to 'QGraphicsScene::itemAt(QPointF&)'
     QGraphicsItem *item = scene()->itemAt(scenePos);
方法:
查找itemAt()函数的定义,QT5中其定义为QGraphicsItem * QGraphicsScene::itemAt(const QPointF & position, const QTransform & deviceTransform) const,注意其定义与QT4不一样。
所以将代码改成相应的调用函数即可。更改QGraphicsItem *item = scene()->itemAt(scenePos);如下
QTransform transform;
QGraphicsItem *item = scene()->itemAt(scenePos,transform);
在QT5中运行即可通过。
阅读(8126) | 评论(0) | 转发(0) |
0

上一篇:C++中的explicit关键字

下一篇:MIF文件介绍

给主人留下些什么吧!~~