[PyQt] PyQt event management

Phil Thompson phil at riverbankcomputing.com
Mon Apr 16 17:36:05 BST 2012

On Mon, 16 Apr 2012 18:30:07 +0200, Pierre Barthelemy <barthpi at gmail.com>
> Dear all,
> I defined a few plot classes, children of qwidget, to handle chaco
plots. I
> would like to have a way to connect a few functions to the event of
> clicking inside the window that i create. I have tried to implement a
> events. In this class, the close event works well. But the other don't:
> when i click inside the qwidget, nothing happens. I would guess that it
> come from the fact that the chaco plot items take the focus, so that
when i
> click inside the window, the chaco plot gets the event. Is there a way
> me to have these events activated, even if the mouse click also
> events from the chaco plots ?

Have a look at the QApplication.focusChanged() signal.


More information about the PyQt mailing list