title: installEventFilter in PyQt5
body: <p>I'm trying to implement an event in PyQT5, but i get this error:</p>
  
  <pre><code>TypeError: installEventFilter(self, QObject): argument 1 has unexpected type 'MainWindow_EXEC'
  </code></pre>
  
  <p>This is my code</p>
  
  <pre><code>import sys
  from time import sleep
  from PyQt5 import QtCore, QtWidgets
  from view_cortes2 import Ui_cortes2enter
  
  class MainWindow_EXEC():
  def __init__(self):
      app = QtWidgets.QApplication(sys.argv)
      cortes2 = QtWidgets.QMainWindow()
      self.ui = Ui_cortes2()
      self.ui.setupUi(cortes2)
      self.flag = 0
      self.ui.ledit_corteA.installEventFilter(self)
      self.ui.ledit_corteB.installEventFilter(self)
      self.ui.buttonGroup.buttonClicked.connect(self.handleButtons)
      cortes2.show()
      sys.exit(app.exec_())
  
  def eventFilter(self, source, event):
      if (event.type() == QtCore.QEvent.FocusIn and source is self.ui.ledit_corteA):
          print("A")
          self.flag = 0
      if (event.type() == QtCore.QEvent.FocusIn and source is self.ui.ledit_corteA):
          print("B")
          self.flag = 1
      return super(cortes2, self).eventFilter(source, event)
  
  if __name__ == "__main__":
      MainWindow_EXEC()
  </code></pre>
  
  <p>The event that I'm trying to add is when I focus in a TextEdit it changes the value of a flag. If i change</p>
  
  <pre><code>self.ui.ledit_corteA.installEventFilter(self)
  </code></pre>
  
  <p>by</p>
  
  <pre><code>self.ui.ledit_corteA.installEventFilter(cortes2)
  </code></pre>
  
  <p>I works, but never changes the value of my flag.</p>
  
  <p>Please help.</p>