[PyKDE] Getting control over the Tab key

Fredrik Juhlin laz at strakt.com
Wed Oct 23 15:12:00 BST 2002


On Wed, 2002-10-23 at 15:04, Konrad Hinsen wrote:
> I am trying to get control over the tab key in my application's main
> widget. But even redefining keyPressEvent() for the main widget
> doesn't help, the tab key events never arrive. At what level are they
> filtered out, and what can I do against that?
They may be filtered out by the widget that has focus, it's hard to
tell. If you want to make sure that you catch all the tab key events,
have a look at QObject::eventFilter() and QObject::installEventFilter().
Installing an event filter in the QApplication will catch all events,
but it also means routing all events through the event filter, which
takes it share of resources.

//Fredrik




More information about the PyQt mailing list