code: def qteRun(self):
          
          # Ignore the request if the widget has no keyPressEvent method.
          if not hasattr(self.qteWidget, 'keyPressEvent'):
              return
  
          # Extract the last key and send it to the widget.
          keyEvent = qte_global.last_key_sequence.toQKeyEventList()[-1]
          try:
              self.qteWidget.keyPressEvent(keyEvent)
          except RuntimeError:
              pass
docs: Extract the last ``QKeyEvent`` from the keyboard sequence
          (there should only be one anyway, but just to be sure) and
          deliver it to the native ``keyPressEvent`` method of the
          widget. The actual call is wrapped in a try-except construct
          because the ``keyPressEvent`` are protected methods in the C++
          code and cannot be called from PyQt, unless the widget itself
          was created in PyQt as opposed to by Qt itself. A typical
          example are the automatic scrollbars of windows. If they have
          the focus (just click on them) when a keyboard event occurs
          then Python 3.2 throws the following exception: "`RuntimeError:
          no access to protected functions or signals for objects not
          created from Python`".
  
          It remains to be seen if this poses a problem.