Replace deprecated QGraphicsScene::itemAt() with items()
Change-Id: I33ee03db775d3cf6807372e0963748cf6a4e07db Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This commit is contained in:
parent
5e6b167fea
commit
693468a54d
@ -53,7 +53,8 @@ void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
QPointF mousePos(event->buttonDownScenePos(Qt::LeftButton).x(),
|
||||
event->buttonDownScenePos(Qt::LeftButton).y());
|
||||
movingItem = itemAt(mousePos.x(), mousePos.y());
|
||||
const QList<QGraphicsItem *> itemList = items(mousePos);
|
||||
movingItem = itemList.isEmpty() ? 0 : itemList.first();
|
||||
|
||||
if (movingItem != 0 && event->button() == Qt::LeftButton) {
|
||||
oldPos = movingItem->pos();
|
||||
|
Loading…
Reference in New Issue
Block a user