Mouse movement problem in QGraphicsView
Hi,
I have a QGraphicsItem which is working as the new mouse icon when the graphics view has mouse tracking on itself. I did this operation by something like the following
CursorItem* myQGraphicsItemAsCursor = new CursorItem()
QGraphicsView::mouseMoveEvent( ... pEvent)
{
...
myQGraphicsItemAsCursor->move(pEvent->x(), pEvent->y())
...
}
CursorItem::move( int x, int y)
{
QGraphicsItem::setPos(x, y);
...
}
The problem is it really seems that mouse suffers from something when it hovers on the view. It couldn't catch all mouse moves. What could be the possible problems?
Thanks in advance
Re: Mouse movement problem in QGraphicsView
Might be improper translation of view coordinates to scene coordinate. Since in view, you get pos based on view coordinates, and when you setPos on item, it sets pos on scene cordinates...
Re: Mouse movement problem in QGraphicsView
Hi,
I mapped the view coordinates to scene's and pass them into the move(...) method but it didn't worked:(