Hi<div><br></div><div>That's a good idea. </div><div>I will implement the canvas events for now...</div><div><br></div><div>...but I would really like to understand why those events are not delivered to my objects. I think they should, and although it is not a big problem, I wouldn't have to rewrite the tests needed to handle the canvasEvent... The QGraphicsView should take care of this for me and send the event automatically to the right objects.</div>
<div><br></div><div>Thanks.</div><div>Florian</div><div><br><div class="gmail_quote">On Mon, Nov 2, 2009 at 10:40 AM, Martin Dobias <span dir="ltr"><<a href="http://wonder.sk">wonder.sk</a>@<a href="http://gmail.com">gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sun, Nov 1, 2009 at 10:54 PM, Florian El Ahdab <<a href="mailto:felahdab@gmail.com">felahdab@gmail.com</a>> wrote:<br>
> Hi Tim.<br>
><br>
> Thanks for your answer.<br>
><br>
> The renderComplete signal works perfectly with the code I sent, and my<br>
> items get refreshed correctly after the canvas is rendered. The SLOT<br>
> macro is not needed for the destination of the signal (but I don't<br>
> really know the details of PyQT...)<br>
><br>
> My problem is about the mouse events. According to the QGraphicsItem<br>
> API documentation, if I override the mousePressEvent and<br>
> mouseReleaseEvent methods, my objects should get the corresponding<br>
> events without further settings... but they don't.<br>
<br>
</div>Hi Florian,<br>
<br>
you should use canvasPressEvent, canvasReleaseEvent and<br>
canvasMoveEvent functions to track mouse cursor on map canvas.<br>
<font color="#888888"><br>
Martin<br>
</font></blockquote></div><br></div>