Konrad,

Python is probably garbage-collecting the FilterObject() object. Try assigning it to a persistent variable, like:

app.filter = FilterObject()
app.installEventFilter(app.filter)

Andy Anderson

Konrad Hinsen wrote:
...
Here is what I tried:

  class FilterObject(QObject):

      def eventFilter(self, object, event):
	  sys.stderr.write(repr(object) + ':' + repr(event) + '\n')
	  return 1

  app = QApplication(sys.argv)
  ...
  app.installEventFilter(FilterObject())
  ...
  app.exec_loop()

This doesn't crash, but doesn't do anything either, the event filter routine
is never called.


_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde

Reply via email to