[PyQt] mousePressEvent not getting called
Phil Thompson
phil at riverbankcomputing.co.uk
Thu Jan 17 23:08:04 GMT 2008
On Thursday 17 January 2008, Quoc Tran wrote:
> 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?
The SIP file for your C++ class is probably incomplete.
Phil
More information about the PyQt
mailing list