[Qt-interest] QGraphicsSceneMouseEvent questions
Yifei Li
yifli at mtu.edu
Thu Nov 5 03:05:10 CET 2009
Hi,
I reimplemented mosuePressEvent(QGraphicsSceneMouseEvent* event) in a class derived from QGraphicsScene.
But no matter where in the scene mouse is clicked:
1) event->pos() always returns (0, 0)
2) event->scenePos() always returns (0, Y) where Y is a very large integer that greatly exceeds the size of my screen
event->screenPos() works correctly.
Why is that? All I want is where the mouse is pressed in the scene.
Does any one have an answer? Thanks
Yifei
More information about the Qt-interest-old
mailing list