QGraphicsItem * QGraphicsScene::itemAt(const QPointF & position) const is deprecated in Qt4.
Use QGraphicsItem * QGraphicsScene::itemAt(const QPointF & position, const QTransform & deviceTransform) const instead. This change is Qt4/Qt5 neutral.
This commit is contained in:
parent
aea769af3d
commit
f188995e55
|
@ -967,7 +967,7 @@ void Model::mousePressEvent(QGraphicsSceneMouseEvent* event)
|
|||
const GraphLinkRecord &record = findRecord(rect, *graphLink);
|
||||
|
||||
//don't like that I am doing this again here after getRectFromPosition call.
|
||||
QGraphicsItem *item = itemAt(event->scenePos());
|
||||
QGraphicsItem *item = itemAt(event->scenePos(), QTransform());
|
||||
QGraphicsPixmapItem *pixmapItem = dynamic_cast<QGraphicsPixmapItem *>(item);
|
||||
if (pixmapItem && (pixmapItem == (*theGraph)[record.vertex].visibleIcon.get()))
|
||||
{
|
||||
|
@ -1061,7 +1061,7 @@ void Model::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
|||
const GraphLinkRecord &record = findRecord(rect, *graphLink);
|
||||
|
||||
//don't like that I am doing this again here after getRectFromPosition call.
|
||||
QGraphicsItem *item = itemAt(event->scenePos());
|
||||
QGraphicsItem *item = itemAt(event->scenePos(), QTransform());
|
||||
QGraphicsPixmapItem *pixmapItem = dynamic_cast<QGraphicsPixmapItem *>(item);
|
||||
if (pixmapItem && (pixmapItem == (*theGraph)[record.vertex].visibleIcon.get()))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user