[PyQt] mousePressEvent not getting called

Quoc Tran g7quoc at hotmail.com
Thu Jan 17 19:14:53 GMT 2008



I’m having a weird problem with using my custom Qt widget in
PyQt.

 

I created a custom QFrame in C++ and overrided:

virtual void mousePressEvent( QMouseEvent * );

 

When I use my widget in python the mousePressEvent is never
called but if I derive off of my custom class in PyQt and override
the mousePressEvent it will get called.

i.e.

class
MyPythonFrame(MyCPlusPlusFrame):

    def
mousePressEvent(self, e):

       
print "mouse event"

 

Any ideas what I’m doing wrong?

 

Thanks!


_________________________________________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080117/2b801d1f/attachment.html


More information about the PyQt mailing list