[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] Custom mousePressEvent
From:       Peter Clark <peter-clark () bethel ! edu>
Date:       2004-10-30 12:44:45
Message-ID: 200410301644.45523.peter-clark () bethel ! edu
[Download RAW message or body]

I'm trying to implement an image map, so that when an image is clicked on, 
the location of the mouse (relative to the image) is returned. That is, 
clicking in the upper lefthand corner of the image should return 0,0. When 
the mousePressEvent is with the dialog window, I don't have any problems 
catching the mouse events. However, what happens is that e.pos() returns the 
mouse position relative to the whole window, so instead of 0,0, I get 14,127. 
But when I try to move the mousePressEvent function off to the mapWidget 
class, it doesn't catch any events.
    Attached is a small example of what I'm trying to do; if anyone has 
suggestions, I would appreciate them.
    :Peter

["test.py" (application/x-python)]

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic