Re: [Interest] QGraphicsSceneMouseEvent, mapFromScene...

2014-04-29 Thread Alexander Semke
> Probably, you have messed up with screenPos() and scenePos() methods > of QGraphicsSceneMouseEvent class? Please, double check your test code. You're right. I really used screenPos instead of scenePos at one place... Thank you for the hint! Alexander ___

Re: [Interest] QGraphicsSceneMouseEvent, mapFromScene...

2014-04-29 Thread Dmitrii Volosnykh
As for me the output of the code below is as expected when placed into QGraphicsItem::mousePressEvent(): qDebug() << "scene:" << event->scenePos(); qDebug() << "map to scene:" << mapToScene(event->pos()); qDebug() << "local:" << event->pos(); qDebug() << "map to local:" << mapFromS

Re: [Interest] QGraphicsSceneMouseEvent, mapFromScene...

2014-04-28 Thread Alexander Semke
Hi Dima, > are talking about screen or scene coordinates? I meant sceenPos() of course... Alexander ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest

Re: [Interest] QGraphicsSceneMouseEvent, mapFromScene...

2014-04-28 Thread Dmitrii Volosnykh
Alexander, are talking about screen or scene coordinates? I don't see any screen-related map-functions among the list of QGraphicsItem class' members. Regards, Dmitrii. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailma

[Interest] QGraphicsSceneMouseEvent, mapFromScene...

2014-04-28 Thread Alexander Semke
Hi, I'm having here a problem with mapFrom/mapTo-functions. In a class derived from QGraphicsItem I override mousePressEvent and I get for mapFromScreen(event->screenPos()) a point that is different from event->pos(). Similarly, mapToScreen(event->pos()) doesn't lead to event->screenPos(). Why?